{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Estimating the SCC full uncertainty using FAIR SCM\n",
    "\n",
    "This notebook is a second step to the `FAIR_pulse` notebook, which calculates the climate-only and full uncertainty to go \n",
    "along with the SCC point estimates and damage function uncertainty values calculated in the first step. \n",
    "\n",
    "The workflow is the same but with the added layer of climate uncertainty, which is generated by a Monte Carlo run of\n",
    "100,000 future climate simulations.\n",
    "\n",
    "Given how data instensive this process is, it is not recommended users attempt to run this notebook without significant computing capacity."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Set up workspace"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "REPO = os.getenv('REPO')\n",
    "DB = os.getenv('DB')\n",
    "OUTPUT = os.getenv('OUTPUT')\n",
    "\n",
    "INPUT_data = '{}/4_damage_function/'.format(DB)\n",
    "OUTPUT_data = '{}/5_scc/global_scc/quadratic/uncertainty/'.format(DB)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: fair==1.3.2 in /home/sklos/miniconda3/lib/python3.8/site-packages (1.3.2)\n",
      "Requirement already satisfied: scipy>=0.19.0 in /home/sklos/miniconda3/lib/python3.8/site-packages (from fair==1.3.2) (1.6.2)\n",
      "Requirement already satisfied: numpy>=1.11.3 in /home/sklos/miniconda3/lib/python3.8/site-packages (from fair==1.3.2) (1.20.3)\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install fair==1.3.2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "import fair\n",
    "import dask\n",
    "import dask.array as dda\n",
    "import dask.dataframe as ddf\n",
    "import dask.distributed as dd\n",
    "import rhg_compute_tools.utils as rhgu\n",
    "import rhg_compute_tools.kubernetes as rhgk\n",
    "\n",
    "import os"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### set up the cluster spec with the correct docker image and packages\n",
    "For running the \"big set of jobs\" over all climate simulations (100,000), ~100 standard workers is pretty good.\n",
    "\n",
    "For post-processing and diagnostics, 10-30 workers is enough.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "client, cluster = rhgk.get_big_cluster(extra_pip_packages=\"fair==1.3.2\")\n",
    "cluster.scale(30) #(100) # use 100 for computing and saving all damages. 30 for post-processing\n",
    "cluster"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Set up the local workspace\n",
    "\n",
    "import other data analysis packages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xarray as xr\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib\n",
    "import matplotlib.pyplot as plt\n",
    "from pandas import IndexSlice as idx\n",
    "\n",
    "import scipy as sp\n",
    "import scipy.stats\n",
    "from scipy.stats import lognorm, norm\n",
    "import seaborn as sns\n",
    "\n",
    "import tqdm\n",
    "\n",
    "from datetime import datetime\n",
    "import sys\n",
    "sys.path.append('./functions/.')\n",
    "\n",
    "import load_climate_parameters as lcp\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### CLIMATE-ONLY OR FULL UNCERTAINTY FLAG \n",
    "- Running climate-only uncertainty uses only the central damage function. (`DO_QUANTILE_REG = False`)\n",
    "- Running full uncertainty (or, climate+statistical uncertainty) uses quantile regression damage functions. (`DO_QUANTILE_REG = True`)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "DO_QUANTILE_REG = True  # Run the code for central damage func or quantile reg damage funcs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "SECTOR = \"mortality\"\n",
    "DAMAGE_VARNAME = \"mortrate\" # variable name in the outputs\n",
    "\n",
    "\n",
    "# these are the index columns in the damage function specification csv's\n",
    "CENTRAL_INDEX_COLS = [0, 1, 2, 3]\n",
    "QR_INDEX_COLS = [0, 1, 2, 3, 4]\n",
    "\n",
    "CLIM_VERS = \"2.1\"\n",
    "DAMAGE_VERS = \"2.5.1\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Set up valuation metadata (turn mortality response into $)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "REFERENCE_YEAR = 1765\n",
    "\n",
    "# year in which damages start being calculated (determined by first year in damages coefs file)\n",
    "START_YEAR = 2015\n",
    "\n",
    "\n",
    "PULSE_YEAR = 2020\n",
    "\n",
    "\n",
    "# in Gt C = 1e9 ton C\n",
    "PULSE_AMT = 1.0\n",
    "\n",
    "# CONVERSION is in units of\n",
    "# [pulse/tCO2] = [1 pulse/PULSE_AMT GtC * 1 GtC/1e9 tC * 12tC/44tCO2]\n",
    "# This is used to convert costs ($Bn_2005 / pulse) to SCC ($_2015/ton\n",
    "# CO2), though the $Bn_2005 to $_2015 is handled later.\n",
    "# Therefore, it should be the inverse of any changes to PULSE_AMT\n",
    "PULSE_CONVERSION = 1.0 / PULSE_AMT / 1e9 * 12.011 / 44.0098\n",
    "\n",
    "MAGNITUDE_OF_DAMAGES = 1e9  # magnitude of damage function values\n",
    "\n",
    "BASE_YEAR_CONVERSION = 1\n",
    "DAMAGES_DEFLATOR = 1\n",
    "PULSE_DEFLATOR = 1\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Read in damage function parameters\n",
    "These next couple functions set up strings used to create/set up filepaths for different versions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_damages_string_version():\n",
    "    version = \"v2.5.1\"\n",
    "    return version\n",
    "\n",
    "\n",
    "def get_climate_string_version():\n",
    "    version = \"v2.1\"\n",
    "    return version\n",
    "\n",
    "\n",
    "def get_damage_coefs_date():\n",
    "    damage_coefs_date = \"2020-05-11\"\n",
    "    return damage_coefs_date\n",
    "\n",
    "\n",
    "def get_damage_name_slug():\n",
    "    damage_slug = \"quadratic_IGIA_MC_global_poly4_uclip_sharecombo\"\n",
    "    return damage_slug\n",
    "\n",
    "\n",
    "def get_climate_output_date():\n",
    "    climate_date = \"2019-06-21\"  # pulse year 2020\n",
    "    return climate_date\n",
    "\n",
    "\n",
    "def get_central_damage_parameters():\n",
    "\n",
    "    # set the path for damage function coefs\n",
    "\n",
    "    damage_path = '{}/mortality_damage_coefficients_{slug}_{ssp}.csv'.format(\n",
    "        INPUT_data, slug=get_damage_name_slug(), ssp=\"{ssp}\")\n",
    "\n",
    "        SSPs = [\"SSP3\"]\n",
    "\n",
    "\n",
    "        damage_params = pd.concat(\n",
    "            {\n",
    "                ssp: pd.read_csv(\n",
    "                    damage_path.format(ssp=ssp), index_col=CENTRAL_INDEX_COLS\n",
    "                )\n",
    "                for ssp in SSPs\n",
    "            },\n",
    "            axis=0,\n",
    "            names=[\"SSP\"],\n",
    "        )\n",
    "\n",
    "        damage_params.columns.names = [\"coefficient\"]\n",
    "\n",
    "        by_scenario = damage_params.unstack(\"year\")\n",
    "        by_scenario.head()  # only one scenario this time around\n",
    "        return by_scenario\n",
    "    elif MORTALITY_DAMAGE_V1:  # mortality damage v1\n",
    "\n",
    "        damage_params = pd.concat(\n",
    "            {\n",
    "                ssp: pd.read_csv(\n",
    "                    damage_path.format(ssp=ssp), index_col=CENTRAL_INDEX_COLS\n",
    "                )\n",
    "                for ssp in SSPs\n",
    "            },\n",
    "            axis=0,\n",
    "            names=[\"SSP\"],\n",
    "        )\n",
    "\n",
    "        damage_params.columns.names = [\"coefficient\"]\n",
    "\n",
    "        # the final format\n",
    "        # Each row is for a given damage function specification: set of constant, betas for each year in one row\n",
    "        #   For each climate parameter set, the SCC is computed once for each row\n",
    "        by_scenario = damage_params.unstack(\"year\")\n",
    "        by_scenario.head()\n",
    "        return by_scenario\n",
    "    else:\n",
    "        raise NotImplementedError\n",
    "\n",
    "\n",
    "def get_quantilereg_damage_parameters():\n",
    "\n",
    "    damage_path = '{}/mortality_damage_coefficients_{slug}_quantilereg_{ssp}.csv'.format(\n",
    "        INPUT_data, slug=get_damage_name_slug(), ssp=\"{ssp}\")\n",
    "    \n",
    "    damage_params = pd.read_csv(\n",
    "        damage_path.format(ssp=\"SSP3\"), index_col=QR_INDEX_COLS\n",
    "        )\n",
    "    damage_params.columns.names = [\"coefficient\"]\n",
    "\n",
    "    by_scenario = damage_params.unstack(\"year\")\n",
    "    return by_scenario"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# plotting utility function\n",
    "def plot_array_columns_as_lines(array_2d):\n",
    "    new_array = np.hstack([array_2d, np.empty_like(array_2d[:, [0]]) * np.nan])\n",
    "\n",
    "    index = np.ones_like(new_array, dtype=int) * np.hstack(\n",
    "        [np.arange(array_2d.shape[1]), np.array([np.nan])]\n",
    "    )\n",
    "\n",
    "    new_len = array_2d.shape[0] * (array_2d.shape[1] + 1)\n",
    "\n",
    "    df = pd.DataFrame(\n",
    "        np.hstack([index.reshape((new_len, 1)), new_array.reshape((new_len, 1))]),\n",
    "        columns=[\"x\", \"y\"],\n",
    "    )\n",
    "\n",
    "    return df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# read in climate parameters & filters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "original_climate_params = lcp.get_parameters(version=get_climate_string_version(),filtered=False)\n",
    "original_climate_params.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "climate_mask = lcp.get_filter_mask(version=get_climate_string_version())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Read in damage func params (central = for climate-only uncertainty; quantilereg = for full uncertainty)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "central_damage_params_by_scenario = get_central_damage_parameters()\n",
    "central_damage_params_by_scenario.head()  # 6 rows x 1430 columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "quantilereg_damage_parameters_by_scenario = get_quantilereg_damage_parameters()\n",
    "quantilereg_damage_parameters_by_scenario.head()  # 30 rows x 1430 columns"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Calculate damages from climate parameter samples\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Functions to convert parameters to results (ie. compute damages)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_damages(temperatures_by_scenario, damage_spec):\n",
    "    \"\"\"\n",
    "    Estimate time series mortality damages\n",
    "    \n",
    "    Accepts temperature changes from FAIR for pulse run and control run,\n",
    "    and a damage specification for mortality\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    temperatures_by_scenario: array\n",
    "        (scenario x pulse x year) array of temperature change from preindustrial by year\n",
    "    Returns\n",
    "    -------\n",
    "    damages : array\n",
    "        (scenario x rcp x year) array of marginal damages due to pulse by year\n",
    "    \n",
    "    \"\"\"\n",
    "\n",
    "    damageyears = np.arange(START_YEAR, 2301)\n",
    "\n",
    "\n",
    "    BASEPERIOD = [2001, 2010]\n",
    "\n",
    "    base_period_temp = (\n",
    "        temperatures_by_scenario[\n",
    "            :,\n",
    "            :,\n",
    "            BASEPERIOD[0] - REFERENCE_YEAR : BASEPERIOD[1] + 1 - REFERENCE_YEAR,\n",
    "        ]\n",
    "        .mean(axis=2)\n",
    "        .reshape(2, 2, 1)\n",
    "    )\n",
    "\n",
    "    temperature_anomalies = (temperatures_by_scenario - base_period_temp)[\n",
    "        :, :, START_YEAR - REFERENCE_YEAR : 2301 - REFERENCE_YEAR\n",
    "    ]\n",
    "\n",
    "    cons = damage_spec.xs(\"cons\", axis=1, level=\"coefficient\").values.reshape(\n",
    "        (len(damage_spec), 1, 1, len(damageyears))\n",
    "    )\n",
    "    beta1 = damage_spec.xs(\"beta1\", axis=1, level=\"coefficient\").values.reshape(\n",
    "        (len(damage_spec), 1, 1, len(damageyears))\n",
    "    )\n",
    "    beta2 = damage_spec.xs(\"beta2\", axis=1, level=\"coefficient\").values.reshape(\n",
    "        (len(damage_spec), 1, 1, len(damageyears))\n",
    "    )\n",
    "\n",
    "    damages = (\n",
    "        PULSE_CONVERSION\n",
    "        * MAGNITUDE_OF_DAMAGES\n",
    "        * BASE_YEAR_CONVERSION\n",
    "        * (\n",
    "            cons\n",
    "            + temperature_anomalies * beta1\n",
    "            + temperature_anomalies ** 2 * beta2\n",
    "        )\n",
    "    )\n",
    "    return damages\n",
    "\n",
    "\n",
    "def produce_mortality_estimate(parameters, damage_spec, return_model_vars=False):\n",
    "    \"\"\"\n",
    "    Estimate time series mortality damages, or return climate response (conc,forcing,temp)\n",
    "    \n",
    "    Accepts a row of a numpy array, which fully\n",
    "    parameterizes a damage simulation in FAIR\n",
    "    \n",
    "    Parameters\n",
    "    ----------\n",
    "    parameters: list-like\n",
    "        0: tcr, the Transient Climate Respons\n",
    "        1: ecs, the Equilibrium Climate Sensitivity\n",
    "        2: d2\n",
    "        3: tau4\n",
    "        4: aeroscale, the aerosol forcing scaling parameter, optional (default 1)\n",
    "\n",
    "    damage_spec: pandas.core.frame.DataFrame\n",
    "        specifies the coefficients and components of damage function\n",
    "        \n",
    "    return_model_vars: bool\n",
    "        True: returns climate model variables \n",
    "        False: returns damages\n",
    "    \n",
    "    Returns\n",
    "    -------\n",
    "    if return_model_vars is False\n",
    "    damages : array\n",
    "        (scenario x rcp x year) array of marginal damages due to pulse by year\n",
    "    \n",
    "    if return_model_vars is True\n",
    "    climate_variables_by_scenario : array\n",
    "        (variable x rcp x year) array of climate vars due to pulse by year (pulse-control)\n",
    "        variable[0] = CO2 con change\n",
    "        variable[1] = CO2 forcing change\n",
    "        variable[2] = temperature change\n",
    "    \n",
    "    \"\"\"\n",
    "\n",
    "    import fair\n",
    "    import fair.RCPs.rcp45, fair.RCPs.rcp85\n",
    "    import warnings\n",
    "\n",
    "    paramlist = list(parameters)\n",
    "\n",
    "    # extract pamaters 0-4 for climate uncertainty\n",
    "    tcr, ecs, d2, tau4 = paramlist[:4]\n",
    "    if len(paramlist) > 4:\n",
    "        aeroscale = paramlist[4]\n",
    "    else:\n",
    "        aeroscale = 1.0\n",
    "\n",
    "    # build array of damage years\n",
    "    damageyears = np.arange(START_YEAR, 2301)\n",
    "    ndy = len(damageyears)\n",
    "\n",
    "    temperatures_by_rcp = []\n",
    "    by_rcp = []\n",
    "\n",
    "    # for each RCP, run FAIR once and then run again with a pulse\n",
    "    for scen in [fair.RCPs.rcp45, fair.RCPs.rcp85]:\n",
    "        Cc, Fc, Tc = fair.forward.fair_scm(\n",
    "            emissions=scen.Emissions.emissions,\n",
    "            tcrecs=np.array([tcr, ecs]),\n",
    "            tau=np.array([1000000, 394.4, 36.54, tau4]),\n",
    "            d=np.array([239.0, d2]),\n",
    "            scale=np.array([1.0] * 8 + [aeroscale] + [1.0] * 4),\n",
    "        )\n",
    "\n",
    "        pulse = scen.Emissions.emissions.copy()\n",
    "        pulse[PULSE_YEAR - REFERENCE_YEAR, 1] += PULSE_AMT\n",
    "\n",
    "        Cp, Fp, Tp = fair.forward.fair_scm(\n",
    "            emissions=pulse,\n",
    "            tcrecs=np.array([tcr, ecs]),\n",
    "            tau=np.array([1000000, 394.4, 36.54, tau4]),\n",
    "            d=np.array([239.0, d2]),\n",
    "            scale=np.array([1.0] * 8 + [aeroscale] + [1.0] * 4),\n",
    "        )\n",
    "\n",
    "        temperatures_by_rcp.append(np.vstack([Tc, Tp]))\n",
    "        # print(np.vstack([Tc,Tp]).shape)\n",
    "\n",
    "        if return_model_vars:\n",
    "            # send back Tp-Tc, Cp-Cc, Fp-Fc too\n",
    "            # note, don't need to rebase b/c sending back differences, which will be 0 before PULSE_YEAR\n",
    "            by_rcp.append(\n",
    "                np.vstack(\n",
    "                    [\n",
    "                        Cp[2000 - REFERENCE_YEAR :, 0] - Cc[2000 - REFERENCE_YEAR :, 0],\n",
    "                        (Fp - Fc).sum(axis=1)[2000 - REFERENCE_YEAR :],\n",
    "                        Tp[2000 - REFERENCE_YEAR :] - Tc[2000 - REFERENCE_YEAR :],\n",
    "                    ]\n",
    "                )\n",
    "            )\n",
    "\n",
    "    if return_model_vars:  # return concentration, forcing, temperature response\n",
    "        vars_by_scenario = np.stack(by_rcp, axis=0)\n",
    "        vars_by_scenario = vars_by_scenario.transpose(1, 0, 2)\n",
    "        return vars_by_scenario\n",
    "    else:  # return time series of damages\n",
    "        # form (scenario, pulse, time) array of temperatures\n",
    "        temperatures_by_scenario = np.stack(temperatures_by_rcp, axis=0)\n",
    "\n",
    "        # move to func so can have different specs\n",
    "        damages = compute_damages(temperatures_by_scenario, damage_spec)\n",
    "\n",
    "        # return scenario * time array of current-year marginal damages\n",
    "        time_series_of_marginal_damages = damages[..., 1, :] - damages[..., 0, :]\n",
    "\n",
    "        return time_series_of_marginal_damages\n",
    "\n",
    "\n",
    "def produce_discounted_mortality_estimate(parameters, damage_spec, varname=\"mortrate\"):\n",
    "    \"\"\" Computes time series of mortality damages for the specified climate parameters,\n",
    "        and returns the discounted time series.\n",
    "    \n",
    "        returns time series of discounted mortality damages (present value)\n",
    "        by scenario and for a set of discount rates \n",
    "    \"\"\"\n",
    "\n",
    "    time_series_of_marginal_damages = produce_mortality_estimate(\n",
    "        parameters, damage_spec, return_model_vars=False\n",
    "    )\n",
    "\n",
    "    time_series_da = xr.DataArray(\n",
    "        time_series_of_marginal_damages,\n",
    "        name=varname,\n",
    "        dims=[\"scenario\", \"rcp\", \"year\"],\n",
    "        coords=[damage_spec.index, [\"rcp45\", \"rcp85\"], np.arange(START_YEAR, 2301)],\n",
    "    )\n",
    "\n",
    "    disc_rates = [0.01, 0.025, 0.03, 0.05]\n",
    "\n",
    "    discounted_time_series = xr.concat(\n",
    "        [\n",
    "            (time_series_da / (1 + r) ** (time_series_da.year - PULSE_YEAR))\n",
    "            for r in disc_rates\n",
    "        ],\n",
    "        dim=pd.Index(disc_rates, name=\"discrate\"),\n",
    "    )\n",
    "\n",
    "    return discounted_time_series.to_dataset(name=\"discounted_mortrate\").unstack(\n",
    "        \"scenario\"\n",
    "    )\n",
    "\n",
    "\n",
    "def produce_scc_pulse_climate_response(parameters):\n",
    "    \"\"\" \n",
    "        For given set of (climate) parameters, run FAIR and return \n",
    "        the climate response to a pulse.\n",
    "        \n",
    "        returns concentration, total_forcing, temperature \"\"\"\n",
    "\n",
    "    import fair\n",
    "    import fair.RCPs.rcp45, fair.RCPs.rcp85\n",
    "    import warnings\n",
    "\n",
    "    paramlist = list(parameters)\n",
    "\n",
    "    # extract pamaters 0-4 for climate uncertainty\n",
    "    tcr, ecs, d2, tau4 = paramlist[:4]\n",
    "    if len(paramlist) > 4:\n",
    "        aeroscale = paramlist[4]\n",
    "    else:\n",
    "        aeroscale = 1.0\n",
    "\n",
    "    temperatures_by_rcp = []\n",
    "    by_rcp = []\n",
    "\n",
    "    # for each RCP, run FAIR once and then run again with a pulse\n",
    "    for scen in [fair.RCPs.rcp45, fair.RCPs.rcp85]:\n",
    "\n",
    "        Cc, Fc, Tc = fair.forward.fair_scm(\n",
    "            emissions=scen.Emissions.emissions,\n",
    "            tcrecs=np.array([tcr, ecs]),\n",
    "            tau=np.array([1000000, 394.4, 36.54, tau4]),\n",
    "            d=np.array([239.0, d2]),\n",
    "            scale=np.array([1.0] * 8 + [aeroscale] + [1.0] * 4),\n",
    "        )\n",
    "\n",
    "        pulse = scen.Emissions.emissions.copy()\n",
    "        pulse[PULSE_YEAR - REFERENCE_YEAR, 1] += PULSE_AMT\n",
    "\n",
    "        Cp, Fp, Tp = fair.forward.fair_scm(\n",
    "            emissions=pulse,\n",
    "            tcrecs=np.array([tcr, ecs]),\n",
    "            tau=np.array([1000000, 394.4, 36.54, tau4]),\n",
    "            d=np.array([239.0, d2]),\n",
    "            scale=np.array([1.0] * 8 + [aeroscale] + [1.0] * 4),\n",
    "        )\n",
    "\n",
    "        temperatures_by_rcp.append(np.vstack([Tc, Tp]))\n",
    "        # print(np.vstack([Tc,Tp]).shape)\n",
    "\n",
    "        # send back Tp-Tc, Cp-Cc, Fp-Fc for years 2000 to end\n",
    "        by_rcp.append(\n",
    "            np.vstack(\n",
    "                [\n",
    "                    Cp[2000 - REFERENCE_YEAR :, 0] - Cc[2000 - REFERENCE_YEAR :, 0],\n",
    "                    (Fp - Fc).sum(axis=1)[2000 - REFERENCE_YEAR :],\n",
    "                    Tp[2000 - REFERENCE_YEAR :] - Tc[2000 - REFERENCE_YEAR :],\n",
    "                ]\n",
    "            )\n",
    "        )\n",
    "\n",
    "    vars_by_scenario = np.stack(by_rcp, axis=0)\n",
    "    vars_by_scenario = vars_by_scenario.transpose(1, 0, 2)\n",
    "\n",
    "    model_response_da = xr.DataArray(\n",
    "        vars_by_scenario,\n",
    "        name=\"output\",\n",
    "        dims=[\"variable\", \"rcp\", \"year\"],\n",
    "        coords=[\n",
    "            [\"concentration\", \"total_forcing\", \"temperature\"],\n",
    "            [\"rcp45\", \"rcp85\"],\n",
    "            np.arange(2000, 2501),\n",
    "        ],\n",
    "    )\n",
    "\n",
    "    return model_response_da.to_dataset(name=\"output\")\n",
    "\n",
    "\n",
    "def produce_mortality_estimate_from_parameter_block(\n",
    "    parameters, damage_spec, return_model_vars=False\n",
    "):\n",
    "    \"\"\"\n",
    "    Estimate damages for each of an arbitrary number of parameters\n",
    "    \"\"\"\n",
    "\n",
    "    return np.apply_along_axis(\n",
    "        produce_mortality_estimate,\n",
    "        1,\n",
    "        parameters,\n",
    "        damage_spec=damage_spec,\n",
    "        return_model_vars=return_model_vars,\n",
    "    )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Sample climate and outcome uncertainty"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Test `produce_mortality_estimate` function on one row of climate params\n",
    "#### climate model outputs\n",
    "\n",
    "dims = `[outputs, rcp, projectionyears]` where `outputs` are `dConcentration, dTotalRadiativeForcing, dTemperature`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# these are for saving intermediate results (damages for all 100,000 samples)\n",
    "if DO_QUANTILE_REG:\n",
    "    damage_specification = quantilereg_damage_parameters_by_scenario\n",
    "    FP_PREFIX = \"quantilereg\"\n",
    "    FP_UNCERTAINTY = \"fulluncertainty\"\n",
    "    FP_SUBDIR = \"intermediate_{}_results\".format(FP_UNCERTAINTY)\n",
    "else:\n",
    "    damage_specification = central_damage_params_by_scenario\n",
    "    FP_PREFIX = \"climateonly\"\n",
    "    FP_UNCERTAINTY = \"climateuncertainty\"\n",
    "    FP_SUBDIR = \"intermediate_{}_results\".format(FP_UNCERTAINTY)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# # test return FAIR model outputs\n",
    "TESTPARAMS = 2000  # choose a random parameter set"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### damages (mortality response) outputs\n",
    "\n",
    "dims = `[pricing scenario, rcp, damageyears]` where `pricing scenario` is specified by \"age_adjustment\", \"heterogeneity\", \"vsl_value\". \n",
    "\n",
    "There are 6 pricing scenarios. If we are running quantile regression damage functions, then there are 6 pricing scenarios for each quantile regression."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "sample_estimate = produce_mortality_estimate(\n",
    "    original_climate_params[TESTPARAMS, :],\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=False,\n",
    ")\n",
    "sample_estimate.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### If quantilereg: Plot pricing scenarios for each quantile regression for each RCP and year\n",
    "#### If central (climateonly): Plot 6 pricing scenarios for the central damage function for each RCP and year"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "fig, ax = plt.subplots(1, 1, figsize=(14, 8))\n",
    "\n",
    "for i in range(sample_estimate.shape[0]):\n",
    "    ax.plot(\n",
    "        np.arange(START_YEAR, 2301),\n",
    "        sample_estimate[i, 0, :],\n",
    "        color=matplotlib.cm.Blues(float(i) / sample_estimate.shape[0]),\n",
    "        label=\"rcp45 {}\".format(\" \".join(str(damage_specification.index.values[i]))),\n",
    "    )\n",
    "\n",
    "for i in range(sample_estimate.shape[0]):\n",
    "    ax.plot(\n",
    "        np.arange(START_YEAR, 2301),\n",
    "        sample_estimate[i, 1, :],\n",
    "        color=matplotlib.cm.Reds(float(i) / sample_estimate.shape[0]),\n",
    "        label=\"rcp85 {}\".format(\" \".join(str(damage_specification.index.values[i]))),\n",
    "    )\n",
    "\n",
    "# Shrink current axis by 20%\n",
    "box = ax.get_position()\n",
    "ax.set_position([box.x0, box.y0, box.width * 0.8, box.height])\n",
    "\n",
    "# Put a legend to the right of the current axis\n",
    "ax.legend(loc=\"center left\", bbox_to_anchor=(1, 0.5))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Test functions on a handful of rows\n",
    "Run a set of climate params at once\n",
    "\n",
    "Returns a block of damages with dims = `[climate param set, pricing scenario, rcp, year]`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "TESTRANGE = np.arange(100, 110)  # (10,20)\n",
    "\n",
    "# test block of damages: on a block of climate params\n",
    "sample_block = produce_mortality_estimate_from_parameter_block(\n",
    "    original_climate_params[TESTRANGE, :], damage_spec=damage_specification\n",
    ")\n",
    "\n",
    "sample_block.shape  # (parameter sets x mortality specs x rcps x time)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Map simulation across all sample parameters\n",
    "Make sure write directories exist:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_damage_coefs_date(), get_damage_name_slug(), get_climate_output_date(), FP_PREFIX, FP_SUBDIR"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Prep filenames for saving intermediate files"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "BASEDIR = BASEDIR_FP.format(sector=SECTOR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "INTERMEDIATE_FP = (\n",
    "    OUTPUT_data\n",
    "    + FP_PREFIX\n",
    "    + \"/mortality_damage_coefficients_{slug}_\"\n",
    "    + \"{varname}_raw_{range1}-{range2}.nc\"\n",
    ").format(\n",
    "    varname=DAMAGE_VARNAME,\n",
    "    slug=get_damage_name_slug(),\n",
    "    range1=\"{}\",\n",
    "    range2=\"{}\",\n",
    ")\n",
    "\n",
    "INTERMEDIATE_CLIM_FP = (\n",
    "    OUTPUT_data\n",
    "    + FP_PREFIX\n",
    "    + \"/mortality_damage_coefficients_{slug}_\"\n",
    "    + \"{varname}_raw_{range1}-{range2}.nc\"\n",
    ").format(\n",
    "    varname=DAMAGE_VARNAME,\n",
    "    slug=get_damage_name_slug(),\n",
    "    range1=\"{}\",\n",
    "    range2=\"{}\",\n",
    ")\n",
    "\n",
    "\n",
    "print(INTERMEDIATE_FP, \"\\n\")\n",
    "print(INTERMEDIATE_CLIM_FP)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### This function is what is mapped to workers\n",
    "Computes damages and saves intermediate files to disk for later post-processing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def compute_and_save_damages_block(n, step, stop, damage_spec, return_model_vars=False):\n",
    "\n",
    "    \"\"\"\n",
    "    Computes damages for a block of climate parameters and saves output to disk.\n",
    "    \n",
    "        `damage_spec`       : central or quantile-regression damage function coefficients\n",
    "        `return_model_vars` : If True, save climate model (FaIR) output to disk\n",
    "                              If False, save damages (mortality rate) to disk\n",
    "    \"\"\"\n",
    "    CHUNK_SIZE = 50\n",
    "\n",
    "    stop = min(stop, n + step)\n",
    "    chunk = min(CHUNK_SIZE, stop - n)\n",
    "\n",
    "    climate_dask = dda.from_array(\n",
    "        original_climate_params[n:stop],\n",
    "        chunks=(chunk, original_climate_params.shape[1]),\n",
    "    )\n",
    "\n",
    "    climate_dask = climate_dask.persist()\n",
    "\n",
    "    if return_model_vars:  # want back C,totalF, T (pulse - control)\n",
    "\n",
    "        print(INTERMEDIATE_CLIM_FP.format(n, stop))\n",
    "\n",
    "        if os.path.isfile(INTERMEDIATE_CLIM_FP.format(n, stop)):\n",
    "            return\n",
    "\n",
    "        climate_outputs = climate_dask.map_blocks(\n",
    "            produce_mortality_estimate_from_parameter_block,\n",
    "            dtype=np.float64,\n",
    "            chunks=(chunk, 3, 2, 501),  # sims x modelouts x rcp x year\n",
    "            drop_axis=1,\n",
    "            new_axis=[1, 2, 3],\n",
    "            damage_spec=damage_spec,\n",
    "            return_model_vars=True,\n",
    "        )\n",
    "        model_da = xr.DataArray(\n",
    "            climate_outputs,\n",
    "            name=\"output\",\n",
    "            dims=[\"simulation\", \"variable\", \"rcp\", \"year\"],\n",
    "            coords=[\n",
    "                np.arange(n, n + step),\n",
    "                [\"concentration\", \"total_forcing\", \"temperature\"],\n",
    "                [\"rcp45\", \"rcp85\"],\n",
    "                np.arange(2000, 2501),\n",
    "            ],\n",
    "        )\n",
    "\n",
    "        model_da = model_da.compute()\n",
    "\n",
    "        print(model_da)\n",
    "        print(\"writing to {}\".format(INTERMEDIATE_CLIM_FP.format(n, stop)))\n",
    "        model_da.to_dataset(name=\"output\").to_netcdf(\n",
    "            INTERMEDIATE_CLIM_FP.format(n, stop)\n",
    "        )\n",
    "\n",
    "    else:  # just damages\n",
    "\n",
    "        if os.path.isfile(INTERMEDIATE_FP.format(FP_SUBDIR, n, stop)):\n",
    "            return\n",
    "\n",
    "        sample_mortality_estimate = climate_dask.map_blocks(\n",
    "            produce_mortality_estimate_from_parameter_block,\n",
    "            dtype=np.float64,\n",
    "            chunks=(chunk, len(damage_spec.index), 2, 286),\n",
    "            drop_axis=1,\n",
    "            new_axis=[1, 2, 3],\n",
    "            damage_spec=damage_spec,\n",
    "        )\n",
    "\n",
    "        da = xr.DataArray(\n",
    "            sample_mortality_estimate,\n",
    "            dims=[\"simulation\", \"scenario\", \"rcp\", \"year\"],\n",
    "            coords=[\n",
    "                np.arange(n, n + step),\n",
    "                damage_spec.index,\n",
    "                [\"rcp45\", \"rcp85\"],\n",
    "                np.arange(START_YEAR, 2301),\n",
    "            ],\n",
    "        )\n",
    "\n",
    "        da = da.compute()\n",
    "\n",
    "        print(\"writing to {}\".format(INTERMEDIATE_FP.format(FP_SUBDIR, n, stop)))\n",
    "\n",
    "        (\n",
    "            da.to_dataset(name=\"mortrate\")\n",
    "            .unstack(\"scenario\")\n",
    "            .to_netcdf(INTERMEDIATE_FP.format(FP_SUBDIR, n, stop))\n",
    "        )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# SCC functions\n",
    "def compute_scc_discounted_timeseries(ds):\n",
    "\n",
    "    rates = [\n",
    "        0.01,\n",
    "        0.015,\n",
    "        0.02,\n",
    "        0.025,\n",
    "        0.03,\n",
    "        0.05,\n",
    "    ]  # NOTE: as of 7/13/2020, adding in 1.5% and 2% discount rates\n",
    "\n",
    "    discounted_timeseries = xr.concat(\n",
    "        [(ds / (1 + r) ** (ds.year - PULSE_YEAR)) for r in rates],\n",
    "        dim=pd.Index(rates, name=\"discrate\"),\n",
    "    )\n",
    "\n",
    "    discounted_timeseries = discounted_timeseries.rename(\n",
    "        {\"mortrate\": \"discounted_mortrate\"}\n",
    "    )\n",
    "    return discounted_timeseries\n",
    "\n",
    "\n",
    "def compute_scc_from_discounted_ts(ds, var_to_rename=\"discounted_mortrate\"):\n",
    "\n",
    "    return ds.sum(dim=\"year\").rename({var_to_rename: \"scc\"})\n",
    "\n",
    "\n",
    "def compute_scc(ds, var_to_rename=\"discounted_mortrate\"):\n",
    "\n",
    "    return compute_scc_from_discounted(\n",
    "        compute_scc_discounted_timeseries(ds, var_to_rename=var_to_rename)\n",
    "    )\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Check versions and filepath for saving the simulations "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"damages\", get_damages_string_version(), \"climate\", get_climate_string_version()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "INTERMEDIATE_FP"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Here we can map all calculations to workers, be it central damage function, or quantile regression. Same calls\n",
    "## run all 100,000 sims\n",
    "Do this in 5 blocks of jobs. These jobs each save an intermediate output file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "step = 250  # this specifies how many are in the \"block\" of climate params\n",
    "return_model_vars = False  # True # CHANGE THIS VAR NAME TO INDICATE SAVE DAMAGES VS CLIMATE VARS. False gives damages. True gives climate vars."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# map blocks of simulations up to the first 20000 params, each map block is 250 params\n",
    "# This takes a little < 7 mins for central damage function, and separately for quantilereg.\n",
    "\n",
    "futures1 = client.map(\n",
    "    compute_and_save_damages_block,\n",
    "    np.arange(0, 20000, step),\n",
    "    step=step,\n",
    "    stop=20000,\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=return_model_vars,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(futures1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "futures2 = client.map(\n",
    "    compute_and_save_damages_block,\n",
    "    np.arange(20000, 40000, step),\n",
    "    step=step,\n",
    "    stop=40000,\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=return_model_vars,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(futures2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "futures3 = client.map(\n",
    "    compute_and_save_damages_block,\n",
    "    np.arange(40000, 60000, step),\n",
    "    step=step,\n",
    "    stop=60000,\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=return_model_vars,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(futures3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "futures4 = client.map(\n",
    "    compute_and_save_damages_block,\n",
    "    np.arange(60000, 80000, step),\n",
    "    step=step,\n",
    "    stop=80000,\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=return_model_vars,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(futures4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "futures5 = client.map(\n",
    "    compute_and_save_damages_block,\n",
    "    np.arange(80000, 100000, step),\n",
    "    step=step,\n",
    "    stop=100000,\n",
    "    damage_spec=damage_specification,\n",
    "    return_model_vars=return_model_vars,\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(futures5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cluster.scale(0)\n",
    "client.restart()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# ==================================== end running all 100,000 simulations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Postprocessing MonteCarlos"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This section reads in all intermediate files saved to disk (in chunks by simulation) and computes the discounted time series and SCC for all simulations. Make sure the above sections that map jobs to workers have been run and all files have been saved before moving to this section.\n",
    "\n",
    "It is a good idea to restart the client (`client.restart()`) and delete all the `futures` from above, before moving on. Or, restart the notebook kernel, run the setup and function definition cells at the top, commission a cluster, and skip to this step for post-processing.\n",
    "\n",
    "For each uncertainty type, the post-processing steps are\n",
    "1. read in all the time series of marginal damages by valuation type (ultimately there will be 100,000 time series for each valuation)\n",
    "2. discount all the time series. Because there are multiple valuation types and discount rates, this has a large memory footprint\n",
    "3. filter out simulations that don't meet criteria (previously determined) \n",
    "4. compute quantiles over discounted time series for the primary valuation type as an intermediate output\n",
    "5. sum all simulations and to SCC\n",
    "6. filter out sccs for simulations that don't meet criteria\n",
    "7. quantile SCCs\n",
    "8. save output files"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1. Open all intermediate files: central damage func \n",
    "Only run this if you've computed the central damages and saved intermediate outputs above.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "BASEDIR = BASEDIR_FP.format(sector=SECTOR)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "CENTRAL_FP = (\n",
    "    OUTPUT_data\n",
    "    + \"/intermediate_climateuncertainty_results/\"\n",
    "    + \"climateonly_mortality_damage_coefficients_{slug}_\"\n",
    "    + \"mortrate_raw_*.nc\"\n",
    ").format(slug=get_damage_name_slug())\n",
    "print(CENTRAL_FP)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cds = xr.open_mfdataset(CENTRAL_FP, concat_dim=\"simulation\", combine=\"nested\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# rechunk for memory purposes\n",
    "cds = cds.chunk(\n",
    "    {\n",
    "        \"simulation\": 100000,\n",
    "        \"rcp\": 1,\n",
    "        \"vsl_value\": 1,\n",
    "        \"heterogeneity\": 1,\n",
    "        \"age_adjustment\": 1,\n",
    "        \"year\": 286,\n",
    "    }\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cds = cds.persist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(cds)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Open all intermediate files: climate response\n",
    "This is unnecessary for SCC calculation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Compute the SCC from mortality damages\n",
    "Break the SCC calc up into two steps so can save the time series of present values"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For all simulations, pricing scenarios, rcps, compute discounted time series (or time series of present values of mortality response), and from that, the SCC"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "tags": []
   },
   "source": [
    "### central damage function SCC (or skip if doing full uncertainty)\n",
    "### 2. Discount & 5. Compute SCC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_discounted_timeseries = compute_scc_discounted_timeseries(cds)\n",
    "c_scc = compute_scc_from_discounted_ts(c_discounted_timeseries)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. filter out bad runs before quantiling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_discounted_ts_selected_params = c_discounted_timeseries.where(\n",
    "    get_filter_mask(), drop=True\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_discounted_ts_selected_params = c_discounted_ts_selected_params.persist()\n",
    "dd.progress(c_discounted_ts_selected_params)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 4. quantile discounted time series for main valuation scenario"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# select out a valuation scenario. 'c' is for the central df\n",
    "vsl_value_c = \"epa\"\n",
    "\n",
    "################### update for each #########################\n",
    "heterogeneity_c = \"scaled\"\n",
    "age_adjustment_c = \"vly\"\n",
    "#############################################################\n",
    "\n",
    "slicers_c = dict(\n",
    "    age_adjustment=age_adjustment_c, heterogeneity=heterogeneity_c, vsl_value=vsl_value_c\n",
    ")\n",
    "\n",
    "c_discounted_ts_mainresults_quantiles = (\n",
    "    c_discounted_ts_selected_params.sel(**slicers_c)\n",
    "    .compute()[\"discounted_{}\".format(\"mortrate\")]\n",
    "    .quantile([0.05, 0.17, 0.25, 0.5, 0.75, 0.83, 0.95], dim=\"simulation\")\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_scc = c_scc.compute()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 6. filter SCC "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_scc_selected_params = c_scc.where(get_filter_mask(), drop=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 7. quantile SCC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_scc_selected_params_quantiles = c_scc_selected_params.quantile(\n",
    "    [0.01, 0.05, 0.17, 0.25, 0.5, 0.75, 0.83, 0.95, 0.99], dim=\"simulation\"\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "c_scc_selected_params_quantiles"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## end of central damage function part of workflow. Start of quantile regression workflow. \n",
    "\n",
    "This is memory intensive. This was run one by one for each of the below valuation scenarios. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Six unique valuation scenarios \n",
    "\n",
    "- vly-epa-scaled (main results 7/24/2020)\n",
    "- vly-epa-popavg\n",
    "- mt-epa-scaled\n",
    "- mt-epa-popavg \n",
    "- vsl-epa-scaled \n",
    "- vsl-epa-popavg "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1. Open all intermediate files: quantile regression damage funcs\n",
    "Only run this if you've computed the quantile regression damages and saved all the intermediate outputs above.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"damages\", get_damage_coefs_date(), get_damage_name_slug()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "QR_FP = (\n",
    "    OUTPUT_dir\n",
    "    + \"/intermediate_fulluncertainty_results/\"\n",
    "    + \"quantilereg_mortality_damage_coefficients_{slug}_\"\n",
    "    + \"mortrate_raw_*TEST.nc\"\n",
    ").format(slug=get_damage_name_slug())\n",
    "print(QR_FP)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qrds = xr.open_mfdataset(\n",
    "    QR_FP, concat_dim=\"simulation\", parallel=True, combine=\"nested\"\n",
    ")\n",
    "print(qrds)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qrds.mortrate.data.nbytes / (\n",
    "    1024 ** 3\n",
    ")  # this is small if testing. About 48Gb for V2p5 (19 quantiles)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qrds = qrds.persist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dd.progress(qrds)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Note that `qrds` has an extra dimension compared to `cds`, which is `pctile` for the quantile regression quantile\n",
    "\n",
    "#### Note also that due to memory issues: we are saving one valuation scenario at a time for quantile regression damage func damages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# select out a valuation scenario - note slicers is defined for each of the dfs (central and quantile reg). Central df above\n",
    "vsl_value = \"epa\"\n",
    "\n",
    "################### update for each #########################\n",
    "heterogeneity = \"scaled\"\n",
    "age_adjustment = \"vly\"\n",
    "#############################################################\n",
    "\n",
    "selected_scenario = f\"{age_adjustment}-{vsl_value}-{heterogeneity}\"#SSP3-vsl-epa-scaled_quantiles\n",
    "\n",
    "slicers = dict(\n",
    "    age_adjustment=age_adjustment, heterogeneity=heterogeneity, vsl_value=vsl_value\n",
    ")\n",
    "qrds_valscen = qrds.sel(**slicers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qrds_valscen"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qrds_valscen.nbytes/(1024**3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "assert qrds_valscen.age_adjustment == age_adjustment\n",
    "assert qrds_valscen.heterogeneity == heterogeneity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2. discount & 5. compute SCC"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_discounted_timeseries_valscen = compute_scc_discounted_timeseries(qrds_valscen)\n",
    "qr_scc_valscen = compute_scc_from_discounted_ts(qr_discounted_timeseries_valscen)\n",
    "\n",
    "qr_discounted_timeseries_valscen.nbytes / (\n",
    "    1024 ** 3\n",
    ")  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3. Filter out the unreasonable climate simulations before quantiling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_discounted_ts_selected_params_valscen = qr_discounted_timeseries_valscen.where(\n",
    "    lcp.get_filter_mask(version=CLIM_VERS), drop=True\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_discounted_ts_selected_params_valscen = (\n",
    "    qr_discounted_ts_selected_params_valscen.persist()\n",
    ")\n",
    "dd.progress(qr_discounted_ts_selected_params_valscen)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_discounted_ts_selected_params_valscen.nbytes / (1024 ** 3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Note how big this is! Do not attempt to bring it into memory or you will regret it :) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Persisting this object means it'll be computed and kept on the workers for use further down (but not brought into notebook memory, and it doesn't hold up execution of other cells). "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### set up functions for weighted quantiling for quantile regression df damages\n",
    "quantiles need to be weighted by the mass of the distribution that is represented by the quantile regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_weights(quantiles):\n",
    "    \"\"\"\n",
    "        Compute the weights of each quantile regression.\n",
    "        `quantiles` must be between 0-1! \n",
    "    \"\"\"\n",
    "    quantiles = np.array(quantiles)\n",
    "    # find midpoints between quantiles\n",
    "    bounds = np.array([0] + ((quantiles[:-1] + quantiles[1:]) / 2).tolist() + [1])\n",
    "    if (bounds > 1).any():\n",
    "        raise RuntimeError(\"quantiles must be between 0-1\")\n",
    "    weights = np.diff(bounds)\n",
    "    return weights\n",
    "\n",
    "def quantile_weight_quantilereg(\n",
    "    ds,\n",
    "    arrayname=\"discounted_mortrate\",\n",
    "    quantiles=[0.01, 0.05, 0.167, 0.25, 0.5, 0.75, 0.833, 0.95, 0.99],\n",
    "):\n",
    "    \"\"\" Produce quantile weights of the quantile regression damages.\n",
    "        qr_quantiles: the quantile regression quantiles for damages. (Must be 0-1!)\n",
    "    \"\"\"\n",
    "    import impactlab_tools.utils.weighting\n",
    "\n",
    "    qr_quantiles = ds.pctile.values\n",
    "    ds_stacked = ds[arrayname].stack(obs=(\"simulation\", \"pctile\"))\n",
    "    weights = xr.DataArray(\n",
    "        get_weights(qr_quantiles), dims=[\"pctile\"], coords=[qr_quantiles]\n",
    "    )\n",
    "    weights_by_obs = weights.sel(pctile=ds_stacked.obs.pctile)\n",
    "    # these are quantiles of the full uncertainty, weighted by the quantile regression quantiles\n",
    "    ds_quantiles = impactlab_tools.utils.weighting.weighted_quantile_xr(\n",
    "        ds_stacked, quantiles, sample_weight=weights_by_obs.values, dim=\"obs\"\n",
    "    )\n",
    "    return ds_quantiles\n",
    "\n",
    " \n",
    "# these functions can accept raw damage time series or already discounted time series\n",
    "\n",
    "def compute_discounted_timeseries(ds, disc_type='constant', **kwargs):\n",
    "    ''' Compute discounted time series based on `disc_type`.\n",
    "    \n",
    "        `disctype` == \"constant\": Compute discounted time series over dim `year` for all `rates`\n",
    "        `disctype` == \"ramsey\": Compute discounted time series over dim `year` for all `rho` and `eta` combinations.\n",
    "                                Note current implementation reads pre-computed rho-eta combination discount factors in from disk.\n",
    "    '''\n",
    "    if 'discrate' in ds.dims:\n",
    "        # already discounted\n",
    "        return ds\n",
    "    else:\n",
    "        if disc_type == 'constant':\n",
    "            discounted_timeseries = compute_constant_discounted_timeseries(ds, **kwargs)\n",
    "        elif disc_type == 'ramsey':\n",
    "            discounted_timeseries = compute_ramsey_discounted_timeseries(ds, **kwargs)\n",
    "            \n",
    "        \n",
    "        return discounted_timeseries    \n",
    "\n",
    "def compute_discounted_timeseries_main(ds, disc_type='constant', filtered = False, **kwargs):\n",
    "    ''' Compute discounted time series over dim `year` for all `rates`\n",
    "        and return main pricing scenario (`var_type`). Result is PERSISTED.\n",
    "        \n",
    "        If `filtered` = True, filter on dim `simulation` and return only filtered MCs\n",
    "    '''\n",
    "    import load_climate_parameters as lcp\n",
    "\n",
    "    \n",
    "    ds = compute_discounted_timeseries(ds, disc_type=disc_type, **kwargs)# will not re-compute if discrate is a dim\n",
    "    \n",
    "    # extract the central pricing scenario\n",
    "    ds_disc_main = ds.sel(var_type=MAIN_PRICING_SCEN)\n",
    "    \n",
    "    if filtered:\n",
    "\n",
    "        if len(ds.simulation)>1:\n",
    "            ds_disc_main = (\n",
    "                ds_disc_main.where(lcp.get_filter_mask(version=CLIM_VERS), \n",
    "                                   drop=True).persist())#.compute())\n",
    "        else:\n",
    "            # statistical uncertainty ds has singleton simulation dim. Do not filter\n",
    "            ds_disc_main = ds_disc_main.persist()\n",
    "    else:\n",
    "        ds_disc_main = ds_disc_main.persist()#.compute()\n",
    "        \n",
    "    return ds_disc_main\n",
    "\n",
    "\n",
    "def compute_discounted_timeseries_main_quantiles(ds, disc_type='constant',\n",
    "                                                 quantiles=[0.05, 0.1, 0.17, 0.25, 0.5, 0.75, 0.83, 0.95], **kwargs):\n",
    "    \n",
    "    if 'var_type' in ds.dims:\n",
    "        # this means still need to select main scenario\n",
    "        ds = compute_discounted_timeseries_main(ds, disc_type=disc_type, filtered = True, **kwargs)\n",
    "        \n",
    "    if 'pctile' in ds.dims:\n",
    "        # quantile regression data --> use special funcs\n",
    "        ds = quantile_weight_quantilereg(ds, quantiles = quantiles)\n",
    "    else:\n",
    "        ds = ds.quantile(quantiles, dim='simulation')\n",
    "\n",
    "    return ds\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "tags": []
   },
   "source": [
    "### 4. Compute quantiles over full uncertainty for discounted time series for \"main results\", which is the main \"pricing scenario\" shown in the paper\n",
    "Map this over discount rate, otherwise too much\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_discounted_ts_selected_params_valscen.sel(discrate=0.02).nbytes/(1024**3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "####  brute force way to compute discounted timeseries quantiles:\n",
    "took this code from the Energy operational ensemble notebook. Compute each discount rate separately"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Brute force\n",
    "qr_disc_main_quantdt = {}\n",
    "\n",
    "for dr in qr_discounted_ts_selected_params_valscen.discrate.values:\n",
    "    qr_disc_main_quantdt[dr] = compute_discounted_timeseries_main_quantiles(qr_discounted_ts_selected_params_valscen.sel(discrate=dr))\n",
    "    print(dr)\n",
    "print(qr_disc_main_quantdt[0.02].nbytes / (1024 ** 3))\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# concat the discrates in to one object\n",
    "qr_disc_main_quantiles = xr.concat(\n",
    "    qr_disc_main_quantdt.values(),\n",
    "    dim=pd.Index(\n",
    "        qr_discounted_ts_selected_params_valscen.discrate.values, name=\"discrate\"\n",
    "    ),\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# save the discounted time series for the selected valuation scenario\n",
    "SAVEDIR = '{basedir}mortality_damage_coefficients_global_poly4'.format(basedir=OUTPUT_data)\n",
    "\n",
    "discounted_fp = (SAVEDIR\n",
    "                + '/mortality_{uncertainty}_discounted_SSP3-{main}'\n",
    "                 + '_quantiles_timeseries_{version}.csv').format(uncertainty=FP_UNCERTAINTY,\n",
    "                                                                 main=selected_scenario,\n",
    "                                                                 version=get_damages_string_version())\n",
    "\n",
    "\n",
    "qr_disc_main_quantiles.to_dataframe(name='present_value').to_csv(discounted_fp)\n",
    "\n",
    "\n",
    "print(\"saved discounted damages to %s\" %discounted_fp)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_disc_main_quantiles.plot.line(x=\"year\", col=\"discrate\",row=\"rcp\",)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 6. filter SCC & 7. compute SCC quantiles "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_scc_valscen_filtered = qr_scc_valscen.where(\n",
    "    lcp.get_filter_mask(version=CLIM_VERS), drop=True\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "qr_scc_valscen_filtered = qr_scc_valscen_filtered.persist()\n",
    "dd.progress(qr_scc_valscen_filtered)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# quantile the SCCs after filtering\n",
    "qr_scc_selected_params_quantiles_valscen = quantile_weight_quantilereg(\n",
    "    qr_scc_valscen_filtered,\n",
    "    arrayname=\"scc\",\n",
    "    quantiles=[0.01, 0.05, 0.17, 0.25, 0.5, 0.75, 0.83, 0.95, 0.99],\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# this is small, bring it into memory to save\n",
    "qr_scc_valscen_filtered = qr_scc_valscen_filtered.compute()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "SCC_FP = (\n",
    "    OUTPUT_data\n",
    "    + \"mortality_damage_coefficients_global_poly4/\"\n",
    "    + \"mortality_scc_{uncertainty}_{age}-{vsl}-{het}_{date}_{version}.nc\"\n",
    ").format(\n",
    "    uncertainty=FP_UNCERTAINTY,\n",
    "    version=get_damages_string_version(),\n",
    "    vsl=vsl_value,\n",
    "    het=heterogeneity,\n",
    "    age=age_adjustment,\n",
    ")\n",
    "print(SCC_FP)\n",
    "qr_scc_valscen_filtered.to_netcdf(SCC_FP)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# save for one valuation scenario\n",
    "\n",
    "SCC_QUANT_FP = (\n",
    "    OUTPUT_data\n",
    "    + \"mortality_damage_coefficients_global_poly4_{date}/\"\n",
    "    + \"mortality_scc_{uncertainty}_{age}-{vsl}-{het}_summary_quantiles_{prefix}_{version}.csv\"\n",
    ").format(\n",
    "    uncertainty=FP_UNCERTAINTY,\n",
    "    prefix=FP_PREFIX,\n",
    "    version=get_damages_string_version(),\n",
    "    vsl=vsl_value,\n",
    "    het=heterogeneity,\n",
    "    age=age_adjustment,\n",
    ")\n",
    "\n",
    "\n",
    "qr_scc_selected_params_quantiles_valscen.to_series().unstack(\"quantile\").to_csv(\n",
    "    SCC_QUANT_FP\n",
    ")\n",
    "print(SCC_QUANT_FP)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cluster.scale(0)\n",
    "client.restart()\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {
     "005770ec06b74e55ae08edcc12fc5b9b": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "01dbfd072b954d5183c19aba8e62381e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_346a10140fd445319b545c0edc2d65da",
       "style": "IPY_MODEL_138d783739d2440b9e5ff45af5ceebfb",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">open_dataset</div>"
      }
     },
     "0339fb2ca916403e9e39fa2eb2e774dd": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "0347f273f0aa417ca8683d8b8da49168": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "034edc3f1f5940acadcf160c09461811": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "04ab913f842747e29c00a2bc5ac666d9": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "057a9ed5b07e49e2880f9311f2a0959c": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "05dc277c77fd489b82532f7314385913": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "06c700a18bea4079b4ffb470a161572a": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "06d6453dc50b4bea9da719218133f0c4": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_4b633bec925940c788b688eacf56c938",
       "style": "IPY_MODEL_17030a7c44214b909061bbc1a0210788",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "082a5fd9744546958d17118db10e6702": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "0858ef6589674f9e84332dedde51f837": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "09544bcd4e0b4b34bb7d5dd38bc5f7a3": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "0a9b59bcccdc4c0d8c6b2ca26c2f2adf": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_2849fce2719e49688b6a7600d1c8f25c",
        "IPY_MODEL_7a71b7fb22c14bfb87a8c609313f5146"
       ],
       "layout": "IPY_MODEL_88659a2abedd4ffcae499e874d7d8963"
      }
     },
     "0aa45622093f4a0ab18a77f8ee2ef0e5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "0be9cfb63b274022b75cc300a77bea9c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "0bebd25fd4284bb59aa386d20c2fcc0b": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "0e0885cd95b14726ba29b54f7025932b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_fab2041dbff044d1a3ce897899f95ddd",
       "style": "IPY_MODEL_ae9144a4bf5248f2b7fede30060428e8",
       "value": "<h2>GatewayCluster</h2>"
      }
     },
     "0e0de58bcbaf4cf68061d8d7a7cbc3f0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "106679e863724e8c9c3689a1eaca754d": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "138d783739d2440b9e5ff45af5ceebfb": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "14cc1ae2fdc240258a8c5e34f6919635": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "14f25ff5e98543169d91c7e0f7fb8637": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "168916c51c8e41b996efbb0b6d4569e9": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_a3cabd4b35eb4b2492e28802965bffd4",
       "style": "IPY_MODEL_b743b69b80904f519c398fc8eacf6521",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">7 / 7</div>"
      }
     },
     "169da15035694e19b88363efd742d5a4": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "16a657f4d607437ab9b410f813f2d9e6": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_b74cba3e800e4fdb8352ebd698f97686",
       "style": "IPY_MODEL_c1218b02968d4ecebf5d5e38ce1c7a33",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "16d0a11c63b04c32809e14a36a4fa9d0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_fa5d3f866ced4d089b61887f906cbb57",
       "style": "IPY_MODEL_73d3cbbfa8374d34adcf314f67389364",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">7 / 7</div>"
      }
     },
     "17030a7c44214b909061bbc1a0210788": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "18468195b2944239b12627ae9e60e031": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_845e9df362b94062bdb8be6389a64eb8",
       "style": "IPY_MODEL_9f0776d9ac5d4f6aa94477ea6ba8c1cd",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "18a4737d5976462eb5b46c213771944b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_0e0885cd95b14726ba29b54f7025932b",
        "IPY_MODEL_d47f1e96b4fa4d128dc968da2f6ceb76",
        "IPY_MODEL_c3081bfeca104e6e88e2d1b1da753440",
        "IPY_MODEL_7bbbf7c900fc4648980eb3a2bbae9f4f"
       ],
       "layout": "IPY_MODEL_1caa93f84091450aacf469434d75ed64"
      }
     },
     "19031a1d4f2f4527a3882a311b5924f0": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "1bbc38c9411146e3942d2de460bff8b6": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "1c35760e1dab41538df3b8c498fb2324": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_d6b482bf1d544223b729f9251155971d",
       "style": "IPY_MODEL_3106ce9ffc6541cd862c153240e20bf4",
       "value": "\n<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table style=\"text-align: right;\">\n    <tr><th>Workers</th> <td>0</td></tr>\n    <tr><th>Cores</th> <td>0</td></tr>\n    <tr><th>Memory</th> <td>0 B</td></tr>\n</table>\n</div>\n"
      }
     },
     "1caa93f84091450aacf469434d75ed64": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "1ccc247b15a64848b9503d094c2eccd7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "1d8c055b87f9460d8a2b7ea0bde15ebf": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "1e3c400d6ea0442b91ddaea75d510607": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "1e423787775d4e5eb59a90cdc0e900a1": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "1e6672d9d5d045d497757900fb6e1bfd": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ButtonStyleModel",
      "state": {}
     },
     "1f6159d946d24409a463151a7b072570": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_22aa7d303012483298abd905078b1283",
       "max": 1,
       "style": "IPY_MODEL_89cc1b34ee7a44808822b6cba3db8b46",
       "value": 1
      }
     },
     "1fd98777eebd49d2a2f984c945600025": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "200e75c77c684b74b45c5a15e136d7ff": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "204f10ec15e64dcca115457164af5305": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "2075804f2a354e44ad5b9f3cfef80cac": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_28513de0e91d4b4e989ecbdd6b28bff1",
       "max": 1,
       "style": "IPY_MODEL_8964892636cf48478d214e145c8d39cf",
       "value": 1
      }
     },
     "20cfa87b4b26465aa74a60735ec69c99": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "22aa7d303012483298abd905078b1283": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "233c6e6b2192487abeaa4324fe036724": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "2481a055299445b7abe2c7e19abb3405": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "2849fce2719e49688b6a7600d1c8f25c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_fa52e53279d04a748125c8d39f2c5835",
       "style": "IPY_MODEL_fa8bdf78b87a480ea4c4cb16a6919dbb",
       "value": "<div style=\"padding: 0px 10px 5px 10px\"><b>Finished:</b>  9.1s</div>"
      }
     },
     "28513de0e91d4b4e989ecbdd6b28bff1": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "28b24077bc5e416aaf241a0123ce6189": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_c5b113cbc0d64165bf3c47971131e647",
        "IPY_MODEL_94bff9198b6d40818b8e3b3407c00e3c",
        "IPY_MODEL_c246d23547f54de1a30f40503b6b7546"
       ],
       "layout": "IPY_MODEL_005770ec06b74e55ae08edcc12fc5b9b"
      }
     },
     "2bcd456108c34d8ab14cc7b7a67cf3f7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "2c3fbe0ace2c48538c82e3cee90bcc92": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "2d528af430144c1ba2f335e8c9cb3964": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "2ed767b6b6d34ed381be9e1c976b9024": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "2fc7127dcbe143dea706735ae846ab12": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "301a95e102db48c3a3eb2715f08dd7ca": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_868185d083b045d8b23632c37ff60b03",
        "IPY_MODEL_a10e8c552f3e47efa55d5b03332488c5",
        "IPY_MODEL_d098346fef6347dfa566826a10b6cab3"
       ],
       "layout": "IPY_MODEL_cf2dfac7023040d298b42a58e221b9d3"
      }
     },
     "30f84b5f39c64d97a0d09f8468e9f0cc": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_b91f4db468d64b66a7580bf346621c8c",
       "style": "IPY_MODEL_cf6079bebfcb4e69a15d65495eadcb2b",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">rechunk-split</div>"
      }
     },
     "3106ce9ffc6541cd862c153240e20bf4": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "3230b8ccd5c54606903bec30c81b9d9d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_ad97adb60c924418a1b36f9f1d656dc1",
        "IPY_MODEL_765406c23e3f4f24b7ff320f48a5c14b"
       ],
       "layout": "IPY_MODEL_ce1c611245994a799d0dcb496b41182e"
      }
     },
     "33db2a1985b54fd3b9f33d482e70e2f8": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "3436a2cd557a4af58ed6f96c9161ff6a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_3446f28ed6b344fb93eeb2e1667f12f5",
       "style": "IPY_MODEL_c4be5eb14f9e4bf493afff2ff174455d",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">truediv</div>"
      }
     },
     "3446f28ed6b344fb93eeb2e1667f12f5": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "346a10140fd445319b545c0edc2d65da": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "350f8a675a46415498770afb9fc80114": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "35cc7263e3674b32b647b965c639a650": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "37316b07f184402db078e81b0c5a5f24": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "3793ed763ce7442282b38b8794e2054b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_6d9199ccc00947a09ead374ab949d002",
       "max": 1,
       "style": "IPY_MODEL_5da7f123256b403bb384839328fcff71",
       "value": 1
      }
     },
     "3881d63a9ea74d549158cd448f034b42": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "38ea13fd2a0749ccb7692be332cea72a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "3b223778658d4618ba14b1b379bc5c97": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "3c955cbc219e4013abf6c0259091d7f5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "3d7514179c524b838d43ef7dfcfdaa8e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "3e2c49bbfa864e42847c496878967ed7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_be0e2385da774a7d81ce272663ba1312",
        "IPY_MODEL_e78d9d2ec3674ed4b85a4e47c2a7d77a",
        "IPY_MODEL_ea4c0fff326f43ebae5578fc872761b9"
       ],
       "layout": "IPY_MODEL_f722ae2ebadd448d855765117f31dc1c"
      }
     },
     "3f7928439ccb4af0878df7ce0f9e81e4": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "3fdaf9e45fce4196afd2470c49db57c4": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "400975b356b64208827a6464450b53d5": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "4448f6dff55348c196c7c9a351e41b30": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "45e561dfc56d4015a0e56f7607a206b2": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "45f6fed191934e429b5d52fde12987b2": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "463780fb5f92470898059b60b8bf09f4": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "467aa9035e8949a5a3a60dd926fcdc6a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_60722ee382dd4d739c16f5b53a2b09e3",
       "style": "IPY_MODEL_3f7928439ccb4af0878df7ce0f9e81e4",
       "value": "<div style=\"padding: 0px 10px 5px 10px\"><b>Finished:</b> 10.4s</div>"
      }
     },
     "4683c5a4d4114dbaaaf2d92d79256a83": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_59701142dea34dcf8ab723b88ab6390e",
       "style": "IPY_MODEL_05dc277c77fd489b82532f7314385913",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">array</div>"
      }
     },
     "49d1a5d33e7c4a16bc5862780c1d4994": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_467aa9035e8949a5a3a60dd926fcdc6a",
        "IPY_MODEL_eda32370d8bf4ab7bf75dcc928501ae6"
       ],
       "layout": "IPY_MODEL_75c6aef0fe7b4323b755b575d0bee12c"
      }
     },
     "4a9fd1c8214e4275987c490c11a45ea7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_7216924c94ae446cb6201401623b2d2f",
       "max": 1,
       "style": "IPY_MODEL_4cacb7676a7245cf96f704d1ec593eb5",
       "value": 1
      }
     },
     "4b633bec925940c788b688eacf56c938": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "4b9e2e10cd0a408ca9a4612bb0274ec0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_6540009167f04a55b6529f24e15ab1c6",
       "max": 1,
       "style": "IPY_MODEL_b7cc6a6bffd64a2b8e66058c900146e8",
       "value": 1
      }
     },
     "4be4a0b0cafe452780534f59f0394450": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {
       "min_width": "500px"
      }
     },
     "4c4116e2add6423ea61826a76ef6077c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "4cacb7676a7245cf96f704d1ec593eb5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "4d5ac9f4785b444db3aaff614746b846": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "4e4ac00d52c04d4c85fdc17854613883": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "4eb3efd5ff5c40fa84c8118fab353345": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_106679e863724e8c9c3689a1eaca754d",
       "max": 1,
       "style": "IPY_MODEL_4ff2a63cfd7b4534b5f9962829c4a2bd",
       "value": 1
      }
     },
     "4ff2a63cfd7b4534b5f9962829c4a2bd": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "504a6d2ad2b1495db394f3671b6d9c86": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_b4610fd76b7e49b08f6abcc2690d0736",
        "IPY_MODEL_4b9e2e10cd0a408ca9a4612bb0274ec0",
        "IPY_MODEL_5a820391a389487c82b7ef411325ea8d"
       ],
       "layout": "IPY_MODEL_bd2aed8f6e1d4e629218e275352886a9"
      }
     },
     "516bbfbaf51a4208816757b153ec4b88": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_dca3f906d86f4a2aacf95f686cc2cf23",
       "max": 1,
       "style": "IPY_MODEL_82f7fdef06714f2baeab46939cfec0f8",
       "value": 1
      }
     },
     "5395b10592c54266b12d9411fdbc4909": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "57170ae76a7740029a8d807ec4fd60b2": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_3b223778658d4618ba14b1b379bc5c97",
       "max": 1,
       "style": "IPY_MODEL_7169f2f6628544b2b8134dda60c1cca3",
       "value": 1
      }
     },
     "5884d6b6b42241fc8bd1a6a133c13175": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_a5506128d91e4e50a1e06f5a6399bcfa",
        "IPY_MODEL_9b35ed8b33b64ce9a174b341fd4293ee",
        "IPY_MODEL_951ea3e73f8947c0a2205ed543559829"
       ],
       "layout": "IPY_MODEL_a293b063272c43488798bf32dd86e38e"
      }
     },
     "59701142dea34dcf8ab723b88ab6390e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "5a1ba2acc584410781bf4dcfd9d70cb3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "5a820391a389487c82b7ef411325ea8d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_c843c5fb9f104ffb86e69dc166a7d922",
       "style": "IPY_MODEL_3c955cbc219e4013abf6c0259091d7f5",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">concatenate</div>"
      }
     },
     "5af93288aacb4107adef0bed0d08f5b0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_400975b356b64208827a6464450b53d5",
       "style": "IPY_MODEL_0858ef6589674f9e84332dedde51f837",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "5b1bf37f074d4735998e678a40d089e5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "5da7f123256b403bb384839328fcff71": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "5f974d5b7e4f4688b83d1d6186a9dced": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "601cc95e9017411f87a3af16e11d0399": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "60722ee382dd4d739c16f5b53a2b09e3": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "60b3df6192434cf2b3683f0a614c7e87": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_d4817e2aff4f4e6abb64ce924ff7c1d8",
       "style": "IPY_MODEL_38ea13fd2a0749ccb7692be332cea72a",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">array</div>"
      }
     },
     "62a9de72f66644abb4cc08e9ce6b8c50": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_b2eb5e1571cf43168229d6abdf4d6fdb",
       "style": "IPY_MODEL_eb1259ce7c024b5fb7ec36574cd41abc",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">rechunk-merge</div>"
      }
     },
     "633911c44efc4e5a82d308f3870f6bd6": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "653f644f2da54c11998aae28b5271a74": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "6540009167f04a55b6529f24e15ab1c6": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "65b900e90ce7484491bbf7bcb7590bf7": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "6698db0ea9d8410e80aed1bc79a6783a": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "68a7f23f6a7b4654a1fc70f2bb5c2d9d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "68c91166f1f447608f1a7be5c7f97ad2": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_2c3fbe0ace2c48538c82e3cee90bcc92",
       "max": 1,
       "style": "IPY_MODEL_c97deb108c45418693a3a90e785bad69",
       "value": 1
      }
     },
     "6a55355cabf24644aa127861f3fc3ab8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_d6ce4e5647034367bd3f18586d046b28",
        "IPY_MODEL_8dec3fc09dcf476e9d88973b20eb2166",
        "IPY_MODEL_d91236be350a4d76b62be6f0b6b24a58"
       ],
       "layout": "IPY_MODEL_74085a4cee7146c79a1eefef464883fd"
      }
     },
     "6adf9ffe3e15409aba30df85e6650508": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "6b1209f7bed340b8b0770a6b30da7801": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "6b75874a046749dd9a48c84d787a1ba9": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_effe2377b1154d2e8225c4009cd95147",
       "style": "IPY_MODEL_77386f71b31347098119048ed341d60e",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">rechunk-split</div>"
      }
     },
     "6bda979a072642209444354ab7ce7a1e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_b3630ae57ee340a7afacab39215da8b9",
       "style": "IPY_MODEL_91a29d10546e445db409b048e6a788c8",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">concatenate</div>"
      }
     },
     "6d4044f4893e49909a4a4f946e7322f6": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "6d9199ccc00947a09ead374ab949d002": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "6de211c0457940d8b8e038758c2ddb18": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_37316b07f184402db078e81b0c5a5f24",
       "max": 1,
       "style": "IPY_MODEL_bfa4a4c9da914efc96d1832dafb0e8d3",
       "value": 1
      }
     },
     "6e4c1b63c1f649fbafd5e380e839d133": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "7156c1c7c8bc4f42be26e46c5fcfc7b6": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_18468195b2944239b12627ae9e60e031",
        "IPY_MODEL_516bbfbaf51a4208816757b153ec4b88",
        "IPY_MODEL_983fcf4780eb4c3bb089b5ce0d25067e"
       ],
       "layout": "IPY_MODEL_fc28302262fd4c9a97f343606f8ee19e"
      }
     },
     "7169f2f6628544b2b8134dda60c1cca3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "72159e57aed64c1894b2e06438c43a9b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_733343da48cf4a47802675cf1911d73e",
       "style": "IPY_MODEL_904706765f724b538c1ebb60640ecc44",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">where</div>"
      }
     },
     "7216924c94ae446cb6201401623b2d2f": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "733343da48cf4a47802675cf1911d73e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "7358cc695c32441a9ac599b34e860aad": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "73d3cbbfa8374d34adcf314f67389364": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "73f34b1b809c4fe8b13c87148b36ec83": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_463780fb5f92470898059b60b8bf09f4",
       "max": 1,
       "style": "IPY_MODEL_68a7f23f6a7b4654a1fc70f2bb5c2d9d",
       "value": 1
      }
     },
     "74085a4cee7146c79a1eefef464883fd": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "75c6aef0fe7b4323b755b575d0bee12c": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "765406c23e3f4f24b7ff320f48a5c14b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ButtonModel",
      "state": {
       "description": "Scale",
       "layout": "IPY_MODEL_ba34ce2821ac401cb76e591d7961ecb4",
       "style": "IPY_MODEL_a1f21c8ce05a4892baac6731083c85b5"
      }
     },
     "77386f71b31347098119048ed341d60e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "777d8390199a4f36925c0ff166de58fa": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_e48c17ea4b7e4eb099f9c4cae4a8caaa",
       "style": "IPY_MODEL_3fdaf9e45fce4196afd2470c49db57c4",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">sum-aggregate</div>"
      }
     },
     "7789366cb0fc459ba1e0fc0498b571cf": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_b2a900fa8366420795ea4b2ee8575ee3",
       "max": 1,
       "style": "IPY_MODEL_84cfdc0d23db46d196d5bf3b9d92750c",
       "value": 1
      }
     },
     "7895384ef609472e8c5b8d3a6aed0a32": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "7a71b7fb22c14bfb87a8c609313f5146": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_e54a1d8d9c3c4b44b5e9a95516729759",
        "IPY_MODEL_504a6d2ad2b1495db394f3671b6d9c86",
        "IPY_MODEL_c7eb43c249544053b3d8fb5bc8e3d142",
        "IPY_MODEL_c6a918f65ac546d2bb0b50428bba0547",
        "IPY_MODEL_dfa7003391c14b91becbccdd0fac74ad",
        "IPY_MODEL_e2e1990de7224020973930392a8b6597",
        "IPY_MODEL_b1c69d40e3be4d0abef2daf15a5add16",
        "IPY_MODEL_6a55355cabf24644aa127861f3fc3ab8",
        "IPY_MODEL_fc88700aa8fd4936b0f5b963bac8f2cd",
        "IPY_MODEL_b59654b6934e4ad59f9629122f4bc850"
       ],
       "layout": "IPY_MODEL_9169402e015640ba89ac035fe6435c82"
      }
     },
     "7a9a16d2704e44fb885411fe7c6caa55": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_7c8e2628aeb14749b46a05a2cca4365c",
        "IPY_MODEL_2075804f2a354e44ad5b9f3cfef80cac",
        "IPY_MODEL_6b75874a046749dd9a48c84d787a1ba9"
       ],
       "layout": "IPY_MODEL_7bae92c1b95e4920bbc600b640022ea8"
      }
     },
     "7ac710d0024e41c28b38f61f92f78ca0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_bfde36edbdbb4849ba3baa42120dea64",
        "IPY_MODEL_93f12a6a509e4b6496a5f888994c807f",
        "IPY_MODEL_c1fce0951c9f4f06ab2b5439928cbd7c"
       ],
       "layout": "IPY_MODEL_992ecc1bc5e344b99af1b4fc1e8a6aca"
      }
     },
     "7b373e08df444f96a5048618da57aea7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_d17f0f346307492cacc19fd36de76dd9",
       "style": "IPY_MODEL_a6f8bf41de514930aea26138f3c0cd0c",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">getitem</div>"
      }
     },
     "7bae92c1b95e4920bbc600b640022ea8": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "7bbbf7c900fc4648980eb3a2bbae9f4f": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_83a13672c3cb462a9cdac5d7365f2905",
       "style": "IPY_MODEL_204f10ec15e64dcca115457164af5305",
       "value": "<p><b>Dashboard: </b><a href=\"/services/dask-gateway/clusters/impactlab-hub.fa5e3c33ced0449d924bbe3423367ced/status\" target=\"_blank\">/services/dask-gateway/clusters/impactlab-hub.fa5e3c33ced0449d924bbe3423367ced/status</a></p>\n"
      }
     },
     "7c13b38ba4b047abbd72e5c1c633d8e0": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ButtonModel",
      "state": {
       "description": "Adapt",
       "layout": "IPY_MODEL_ba34ce2821ac401cb76e591d7961ecb4",
       "style": "IPY_MODEL_1e6672d9d5d045d497757900fb6e1bfd"
      }
     },
     "7c8e2628aeb14749b46a05a2cca4365c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_633911c44efc4e5a82d308f3870f6bd6",
       "style": "IPY_MODEL_5f974d5b7e4f4688b83d1d6186a9dced",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "7ca3ff76f81e478580b931c4b649fa2b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "7d03be72617948c78237e247fc50aa01": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "813f66f7c2b14347b4347cb017c208d3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "81986b6003374324be904a7f960833fc": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_d5407618465944a6beb0985c0c1ca0f7",
       "style": "IPY_MODEL_2481a055299445b7abe2c7e19abb3405",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">open_dataset</div>"
      }
     },
     "82f7fdef06714f2baeab46939cfec0f8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "83a13672c3cb462a9cdac5d7365f2905": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "8422811e80c74b44870015600caacfd9": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_65b900e90ce7484491bbf7bcb7590bf7",
       "max": 1,
       "style": "IPY_MODEL_45f6fed191934e429b5d52fde12987b2",
       "value": 1
      }
     },
     "84469fbb1ac8479e8e3d94e7c973d955": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_b2cfc8da8062413ab44174e83a62fb00",
       "style": "IPY_MODEL_04ab913f842747e29c00a2bc5ac666d9",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "845e9df362b94062bdb8be6389a64eb8": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "84a868ff38ff4996ab23eefa2be7862d": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "84cfdc0d23db46d196d5bf3b9d92750c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "84e027d683464695abea8f5a459837c7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "856bdb5a97834136899b3c580f39cd2d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "85ea952afb4949ab98e9e1a2af3e5e77": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "864f86efae5942e6a01f94b3166d58ab": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "868185d083b045d8b23632c37ff60b03": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_f108c394046c4dfc8222ea4e897be458",
       "style": "IPY_MODEL_c2f1305d38ac4a668e74fc3b29a2f59f",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2800 / 2800</div>"
      }
     },
     "88659a2abedd4ffcae499e874d7d8963": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "89109937c08044d98a59361e0b97bf5f": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "8964892636cf48478d214e145c8d39cf": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "89cc1b34ee7a44808822b6cba3db8b46": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "89dab3fe49ba43cf8f6927c4aad00461": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "8aa044dbdd8e4e8da43b2d4641ce78f3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_c7a3c865f9d940d485125248bbe13f08",
        "IPY_MODEL_e79a74282e584601b61e2f2feb59becd",
        "IPY_MODEL_7c13b38ba4b047abbd72e5c1c633d8e0"
       ],
       "layout": "IPY_MODEL_14cc1ae2fdc240258a8c5e34f6919635"
      }
     },
     "8ba66a74114e45ce9c5e161a2ae7758e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_0339fb2ca916403e9e39fa2eb2e774dd",
       "style": "IPY_MODEL_a22a6da1235f4d36b1ae4a9437bdf44d",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">where</div>"
      }
     },
     "8cf3b70a77284943a7d246ae8e3e714a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "AccordionModel",
      "state": {
       "_titles": {
        "0": "Manual Scaling",
        "1": "Adaptive Scaling"
       },
       "children": [
        "IPY_MODEL_3230b8ccd5c54606903bec30c81b9d9d",
        "IPY_MODEL_8aa044dbdd8e4e8da43b2d4641ce78f3"
       ],
       "layout": "IPY_MODEL_4be4a0b0cafe452780534f59f0394450",
       "selected_index": null
      }
     },
     "8dec3fc09dcf476e9d88973b20eb2166": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_45e561dfc56d4015a0e56f7607a206b2",
       "max": 1,
       "style": "IPY_MODEL_9b7ea16a50d44e5fa1cf44167a0627bc",
       "value": 1
      }
     },
     "904706765f724b538c1ebb60640ecc44": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "9169402e015640ba89ac035fe6435c82": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "91a29d10546e445db409b048e6a788c8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "92b9d4b16a434f419ea3e193e16264e7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_1e423787775d4e5eb59a90cdc0e900a1",
       "style": "IPY_MODEL_ca872245b92a45e78969e766adee3643",
       "value": "<div style=\"padding: 0px 10px 5px 10px\"><b>Finished:</b>  9.8s</div>"
      }
     },
     "93db32cd6a30426b9a59153f808e166b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_1bbc38c9411146e3942d2de460bff8b6",
       "style": "IPY_MODEL_14f25ff5e98543169d91c7e0f7fb8637",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "93f12a6a509e4b6496a5f888994c807f": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_09544bcd4e0b4b34bb7d5dd38bc5f7a3",
       "max": 1,
       "style": "IPY_MODEL_c8d7286920cf4b5b9831cb042768825c",
       "value": 1
      }
     },
     "94bff9198b6d40818b8e3b3407c00e3c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_f1077042042f4f7aa768cf8de419abff",
        "IPY_MODEL_73f34b1b809c4fe8b13c87148b36ec83",
        "IPY_MODEL_81986b6003374324be904a7f960833fc"
       ],
       "layout": "IPY_MODEL_d9d6f68c7ba14c23bda9c48310b58db1"
      }
     },
     "951de4b28e7546b1b6d851596f8d1b26": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "951ea3e73f8947c0a2205ed543559829": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_1d8c055b87f9460d8a2b7ea0bde15ebf",
       "style": "IPY_MODEL_9ebd99cbf9524010bf2fd0a7670fbb9a",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">broadcast_to</div>"
      }
     },
     "954a54751f8b4fd6aa164f41e45e0dc7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "95de8e3cf5404d31997c688996d89e83": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "983fcf4780eb4c3bb089b5ce0d25067e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_84a868ff38ff4996ab23eefa2be7862d",
       "style": "IPY_MODEL_7ca3ff76f81e478580b931c4b649fa2b",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">rechunk-merge</div>"
      }
     },
     "991a43c0bd5b49d99f535651cdd5cbaf": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_bfac20ba95f94118ad168ef631ee7a8b",
       "style": "IPY_MODEL_3d7514179c524b838d43ef7dfcfdaa8e",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">sum</div>"
      }
     },
     "992ecc1bc5e344b99af1b4fc1e8a6aca": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "99734dc9f0654f3ea238570cf1a9a08d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_6e4c1b63c1f649fbafd5e380e839d133",
       "max": 1,
       "style": "IPY_MODEL_d16e0bb7eb274f47b211dac55ebc44c3",
       "value": 1
      }
     },
     "9b35ed8b33b64ce9a174b341fd4293ee": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_200e75c77c684b74b45c5a15e136d7ff",
       "max": 1,
       "style": "IPY_MODEL_85ea952afb4949ab98e9e1a2af3e5e77",
       "value": 1
      }
     },
     "9b7ea16a50d44e5fa1cf44167a0627bc": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "9b9bfac2d75c44b0b88eb1f2cf05d1b2": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_7d03be72617948c78237e247fc50aa01",
       "style": "IPY_MODEL_1ccc247b15a64848b9503d094c2eccd7",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "9bda7cdd465f4128b6eb4344d8fd464c": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "9c26cfdf00024d90a6e3e9975817c87e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "9cda4b3c7d9248418679782e08644d7e": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "9ebd99cbf9524010bf2fd0a7670fbb9a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "9f0776d9ac5d4f6aa94477ea6ba8c1cd": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "a10e8c552f3e47efa55d5b03332488c5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_89109937c08044d98a59361e0b97bf5f",
       "max": 1,
       "style": "IPY_MODEL_c01cfc10200442848a5eb036f13f479b",
       "value": 1
      }
     },
     "a1f21c8ce05a4892baac6731083c85b5": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ButtonStyleModel",
      "state": {}
     },
     "a22a6da1235f4d36b1ae4a9437bdf44d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "a26e31fcc205425383281d66e4a95654": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "a293b063272c43488798bf32dd86e38e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "a332e5e77f904321be6fdfcd91d8d49a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "a3cabd4b35eb4b2492e28802965bffd4": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "a440b92c4b5f4298864e4688d90cad4b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_169da15035694e19b88363efd742d5a4",
       "max": 1,
       "style": "IPY_MODEL_954a54751f8b4fd6aa164f41e45e0dc7",
       "value": 1
      }
     },
     "a5506128d91e4e50a1e06f5a6399bcfa": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_082a5fd9744546958d17118db10e6702",
       "style": "IPY_MODEL_89dab3fe49ba43cf8f6927c4aad00461",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "a6f8bf41de514930aea26138f3c0cd0c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "aa426389e70c4f289e4988c592becd38": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_92b9d4b16a434f419ea3e193e16264e7",
        "IPY_MODEL_28b24077bc5e416aaf241a0123ce6189"
       ],
       "layout": "IPY_MODEL_cf0b6b8ae09845b895d561f96c6c34ce"
      }
     },
     "aad2f568d10c4de9856e1c6599f61c46": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "aad5667e96ac4765bcec135b1c32c369": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_4448f6dff55348c196c7c9a351e41b30",
       "style": "IPY_MODEL_601cc95e9017411f87a3af16e11d0399",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2800 / 2800</div>"
      }
     },
     "aca51f11a0634e10be1c031432e1a603": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "ad97adb60c924418a1b36f9f1d656dc1": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "IntTextModel",
      "state": {
       "description": "Workers",
       "layout": "IPY_MODEL_ba34ce2821ac401cb76e591d7961ecb4",
       "step": 1,
       "style": "IPY_MODEL_4e4ac00d52c04d4c85fdc17854613883"
      }
     },
     "ae9144a4bf5248f2b7fede30060428e8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "aec0c035c08543b29794f66320a987f1": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_9b9bfac2d75c44b0b88eb1f2cf05d1b2",
        "IPY_MODEL_7789366cb0fc459ba1e0fc0498b571cf",
        "IPY_MODEL_3436a2cd557a4af58ed6f96c9161ff6a"
       ],
       "layout": "IPY_MODEL_cb0e582305564adbb07a9cde2c042038"
      }
     },
     "af3d46d346d04f6286cb8952d4e57045": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "afd7d4580fb94c00ab1d513fd4aa8a94": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_c590e02363d4424aa78642893d748c14",
       "style": "IPY_MODEL_1e3c400d6ea0442b91ddaea75d510607",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "b1c69d40e3be4d0abef2daf15a5add16": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_c63f31b5637844aa8d690cf4b42f4e55",
        "IPY_MODEL_8422811e80c74b44870015600caacfd9",
        "IPY_MODEL_62a9de72f66644abb4cc08e9ce6b8c50"
       ],
       "layout": "IPY_MODEL_d1990c86c4f04ca58e87e77392db48b7"
      }
     },
     "b2a900fa8366420795ea4b2ee8575ee3": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b2cfc8da8062413ab44174e83a62fb00": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b2eb5e1571cf43168229d6abdf4d6fdb": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b3630ae57ee340a7afacab39215da8b9": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b3cb46794c574bf3956ea0c9d87e396b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "b4610fd76b7e49b08f6abcc2690d0736": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_0347f273f0aa417ca8683d8b8da49168",
       "style": "IPY_MODEL_35cc7263e3674b32b647b965c639a650",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2800 / 2800</div>"
      }
     },
     "b4b16138f8bb4c30b44f174001b0a16b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_93db32cd6a30426b9a59153f808e166b",
        "IPY_MODEL_68c91166f1f447608f1a7be5c7f97ad2",
        "IPY_MODEL_991a43c0bd5b49d99f535651cdd5cbaf"
       ],
       "layout": "IPY_MODEL_d6de0824dab8496ba86074a68e3062ed"
      }
     },
     "b4fd878c4c4a478dbd0499e8c0547bf8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_6698db0ea9d8410e80aed1bc79a6783a",
       "style": "IPY_MODEL_4c4116e2add6423ea61826a76ef6077c",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "b59654b6934e4ad59f9629122f4bc850": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_16d0a11c63b04c32809e14a36a4fa9d0",
        "IPY_MODEL_a440b92c4b5f4298864e4688d90cad4b",
        "IPY_MODEL_60b3df6192434cf2b3683f0a614c7e87"
       ],
       "layout": "IPY_MODEL_233c6e6b2192487abeaa4324fe036724"
      }
     },
     "b608506fddb8421f8d42c3c4fb644f99": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_9bda7cdd465f4128b6eb4344d8fd464c",
       "max": 1,
       "style": "IPY_MODEL_ed600db447d34ef5a29df2b1d2ba63be",
       "value": 1
      }
     },
     "b6f3905ebbf14eb5adc3d31fee53d527": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "b743b69b80904f519c398fc8eacf6521": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "b74cba3e800e4fdb8352ebd698f97686": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b76e83970d1b4cc497e7021d56dcb1fb": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_f3c68e6c65f748c88759e7c92a71105d",
       "style": "IPY_MODEL_ce7cb3e89f78432ca62b29356adb359b",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     },
     "b7cc6a6bffd64a2b8e66058c900146e8": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "b85d4db1861148bdbc99b980c393e62a": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b91f4db468d64b66a7580bf346621c8c": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "b95a37166a5648f38e750dbc99771e2a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_c7ba846d2d30473282712465f80b1c2b",
        "IPY_MODEL_99734dc9f0654f3ea238570cf1a9a08d",
        "IPY_MODEL_7b373e08df444f96a5048618da57aea7"
       ],
       "layout": "IPY_MODEL_d99fc04b89a24b99b30b4993dc99b10a"
      }
     },
     "ba34ce2821ac401cb76e591d7961ecb4": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {
       "width": "150px"
      }
     },
     "ba64f94bd9a84e53befeb31b2dd8764f": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "bc3f9b11b2f7490eadfcd159feb3f100": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bd06655e865d4b21abbe462990213f82": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bd2aed8f6e1d4e629218e275352886a9": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bd4234d1571b4323b14c57653b1541ef": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_ffa5f598cb474238b8dab6027bd48336",
       "max": 1,
       "style": "IPY_MODEL_813f66f7c2b14347b4347cb017c208d3",
       "value": 1
      }
     },
     "be0e2385da774a7d81ce272663ba1312": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_e9ee102ba617491b90b13b86f083b1a0",
       "style": "IPY_MODEL_2bcd456108c34d8ab14cc7b7a67cf3f7",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "be5665afbf7a4f6991a3406c451c2ab2": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_20cfa87b4b26465aa74a60735ec69c99",
       "style": "IPY_MODEL_b6f3905ebbf14eb5adc3d31fee53d527",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">getitem</div>"
      }
     },
     "be8d0a62f87246f1b619615e7e7438e5": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bf54e7f498a444f2aed92c8b5d9b6d06": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bfa4a4c9da914efc96d1832dafb0e8d3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "bfac20ba95f94118ad168ef631ee7a8b": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "bfde36edbdbb4849ba3baa42120dea64": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_bf54e7f498a444f2aed92c8b5d9b6d06",
       "style": "IPY_MODEL_c3b6cee7300d43eda2995aa1e8ef2502",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "c01cfc10200442848a5eb036f13f479b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c07277892e78465891da93b25f73962d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c1218b02968d4ecebf5d5e38ce1c7a33": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c1fce0951c9f4f06ab2b5439928cbd7c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_653f644f2da54c11998aae28b5271a74",
       "style": "IPY_MODEL_84e027d683464695abea8f5a459837c7",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">original</div>"
      }
     },
     "c246d23547f54de1a30f40503b6b7546": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_84469fbb1ac8479e8e3d94e7c973d955",
        "IPY_MODEL_e9d361defa264c4f98f5e2794e82dc15",
        "IPY_MODEL_6bda979a072642209444354ab7ce7a1e"
       ],
       "layout": "IPY_MODEL_33db2a1985b54fd3b9f33d482e70e2f8"
      }
     },
     "c2a7ffb342ed418cb0e94be384d01941": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_4d5ac9f4785b444db3aaff614746b846",
       "style": "IPY_MODEL_1fd98777eebd49d2a2f984c945600025",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "c2f1305d38ac4a668e74fc3b29a2f59f": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c3081bfeca104e6e88e2d1b1da753440": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_aca51f11a0634e10be1c031432e1a603",
       "style": "IPY_MODEL_2fc7127dcbe143dea706735ae846ab12",
       "value": "<p><b>Name: </b>impactlab-hub.fa5e3c33ced0449d924bbe3423367ced</p>"
      }
     },
     "c3b6cee7300d43eda2995aa1e8ef2502": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c4be5eb14f9e4bf493afff2ff174455d": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c590e02363d4424aa78642893d748c14": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "c5b113cbc0d64165bf3c47971131e647": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_afd7d4580fb94c00ab1d513fd4aa8a94",
        "IPY_MODEL_3793ed763ce7442282b38b8794e2054b",
        "IPY_MODEL_e6195c2a27ce42239a14c10b5e1fcef3"
       ],
       "layout": "IPY_MODEL_06c700a18bea4079b4ffb470a161572a"
      }
     },
     "c5e7c458e6644ad6a740e8273a8a9b4b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_b76e83970d1b4cc497e7021d56dcb1fb",
        "IPY_MODEL_1f6159d946d24409a463151a7b072570",
        "IPY_MODEL_777d8390199a4f36925c0ff166de58fa"
       ],
       "layout": "IPY_MODEL_951de4b28e7546b1b6d851596f8d1b26"
      }
     },
     "c63f31b5637844aa8d690cf4b42f4e55": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_bc3f9b11b2f7490eadfcd159feb3f100",
       "style": "IPY_MODEL_0be9cfb63b274022b75cc300a77bea9c",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "c6a918f65ac546d2bb0b50428bba0547": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_b4fd878c4c4a478dbd0499e8c0547bf8",
        "IPY_MODEL_bd4234d1571b4323b14c57653b1541ef",
        "IPY_MODEL_ff596372e4f74f5c8196bc6cbb76f975"
       ],
       "layout": "IPY_MODEL_19031a1d4f2f4527a3882a311b5924f0"
      }
     },
     "c7a3c865f9d940d485125248bbe13f08": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "IntTextModel",
      "state": {
       "description": "Minimum",
       "layout": "IPY_MODEL_ba34ce2821ac401cb76e591d7961ecb4",
       "step": 1,
       "style": "IPY_MODEL_7358cc695c32441a9ac599b34e860aad"
      }
     },
     "c7ba846d2d30473282712465f80b1c2b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_6adf9ffe3e15409aba30df85e6650508",
       "style": "IPY_MODEL_0e0de58bcbaf4cf68061d8d7a7cbc3f0",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2800 / 2800</div>"
      }
     },
     "c7eb43c249544053b3d8fb5bc8e3d142": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_ffdb4d5f739544c7b38e487b75f4cea7",
        "IPY_MODEL_4a9fd1c8214e4275987c490c11a45ea7",
        "IPY_MODEL_8ba66a74114e45ce9c5e161a2ae7758e"
       ],
       "layout": "IPY_MODEL_057a9ed5b07e49e2880f9311f2a0959c"
      }
     },
     "c843c5fb9f104ffb86e69dc166a7d922": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "c8a647dc0083418e95a40bdd4f6ac950": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_350f8a675a46415498770afb9fc80114",
       "max": 1,
       "style": "IPY_MODEL_c07277892e78465891da93b25f73962d",
       "value": 1
      }
     },
     "c8d7286920cf4b5b9831cb042768825c": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "c97deb108c45418693a3a90e785bad69": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "ca2bb6f4ceb04fd88cd99665a56d8be3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "ca872245b92a45e78969e766adee3643": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "cb0e582305564adbb07a9cde2c042038": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "ccad241d1d1f4c3fb20550c903c996ef": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_168916c51c8e41b996efbb0b6d4569e9",
        "IPY_MODEL_6de211c0457940d8b8e038758c2ddb18",
        "IPY_MODEL_4683c5a4d4114dbaaaf2d92d79256a83"
       ],
       "layout": "IPY_MODEL_db64e9cfe366468caa009564624600e9"
      }
     },
     "ce1c611245994a799d0dcb496b41182e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "ce7cb3e89f78432ca62b29356adb359b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "cf0b6b8ae09845b895d561f96c6c34ce": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "cf2dfac7023040d298b42a58e221b9d3": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "cf6079bebfcb4e69a15d65495eadcb2b": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "d098346fef6347dfa566826a10b6cab3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_6b1209f7bed340b8b0770a6b30da7801",
       "style": "IPY_MODEL_5b1bf37f074d4735998e678a40d089e5",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">concatenate</div>"
      }
     },
     "d152456d2df7450dbffaaf086e0829e0": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d16e0bb7eb274f47b211dac55ebc44c3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "d17f0f346307492cacc19fd36de76dd9": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d1990c86c4f04ca58e87e77392db48b7": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d47f1e96b4fa4d128dc968da2f6ceb76": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_1c35760e1dab41538df3b8c498fb2324",
        "IPY_MODEL_8cf3b70a77284943a7d246ae8e3e714a"
       ],
       "layout": "IPY_MODEL_9c26cfdf00024d90a6e3e9975817c87e"
      }
     },
     "d4817e2aff4f4e6abb64ce924ff7c1d8": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d5407618465944a6beb0985c0c1ca0f7": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d6030392d7e84295861ffdb2589db9ed": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_be8d0a62f87246f1b619615e7e7438e5",
       "style": "IPY_MODEL_a26e31fcc205425383281d66e4a95654",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">broadcast_to</div>"
      }
     },
     "d6b482bf1d544223b729f9251155971d": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {
       "min_width": "150px"
      }
     },
     "d6ce4e5647034367bd3f18586d046b28": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_f5b17b7ec4ef467a9fcc84dfa30fcec6",
       "style": "IPY_MODEL_9cda4b3c7d9248418679782e08644d7e",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "d6de0824dab8496ba86074a68e3062ed": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d91236be350a4d76b62be6f0b6b24a58": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_af3d46d346d04f6286cb8952d4e57045",
       "style": "IPY_MODEL_ba64f94bd9a84e53befeb31b2dd8764f",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">original</div>"
      }
     },
     "d99fc04b89a24b99b30b4993dc99b10a": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "d9d6f68c7ba14c23bda9c48310b58db1": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "db64e9cfe366468caa009564624600e9": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "dca3f906d86f4a2aacf95f686cc2cf23": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "dcd62cc1ae3d477080ac2e678dde3d89": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "dfa7003391c14b91becbccdd0fac74ad": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_5af93288aacb4107adef0bed0d08f5b0",
        "IPY_MODEL_c8a647dc0083418e95a40bdd4f6ac950",
        "IPY_MODEL_d6030392d7e84295861ffdb2589db9ed"
       ],
       "layout": "IPY_MODEL_b85d4db1861148bdbc99b980c393e62a"
      }
     },
     "e2e1990de7224020973930392a8b6597": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_c2a7ffb342ed418cb0e94be384d01941",
        "IPY_MODEL_4eb3efd5ff5c40fa84c8118fab353345",
        "IPY_MODEL_30f84b5f39c64d97a0d09f8468e9f0cc"
       ],
       "layout": "IPY_MODEL_034edc3f1f5940acadcf160c09461811"
      }
     },
     "e48c17ea4b7e4eb099f9c4cae4a8caaa": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "e54a1d8d9c3c4b44b5e9a95516729759": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_aad5667e96ac4765bcec135b1c32c369",
        "IPY_MODEL_b608506fddb8421f8d42c3c4fb644f99",
        "IPY_MODEL_be5665afbf7a4f6991a3406c451c2ab2"
       ],
       "layout": "IPY_MODEL_5395b10592c54266b12d9411fdbc4909"
      }
     },
     "e6195c2a27ce42239a14c10b5e1fcef3": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_2ed767b6b6d34ed381be9e1c976b9024",
       "style": "IPY_MODEL_0aa45622093f4a0ab18a77f8ee2ef0e5",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">original</div>"
      }
     },
     "e78d9d2ec3674ed4b85a4e47c2a7d77a": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_0bebd25fd4284bb59aa386d20c2fcc0b",
       "max": 1,
       "style": "IPY_MODEL_5a1ba2acc584410781bf4dcfd9d70cb3",
       "value": 1
      }
     },
     "e79a74282e584601b61e2f2feb59becd": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "IntTextModel",
      "state": {
       "description": "Maximum",
       "layout": "IPY_MODEL_ba34ce2821ac401cb76e591d7961ecb4",
       "step": 1,
       "style": "IPY_MODEL_a332e5e77f904321be6fdfcd91d8d49a"
      }
     },
     "e9d361defa264c4f98f5e2794e82dc15": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_3881d63a9ea74d549158cd448f034b42",
       "max": 1,
       "style": "IPY_MODEL_b3cb46794c574bf3956ea0c9d87e396b",
       "value": 1
      }
     },
     "e9ee102ba617491b90b13b86f083b1a0": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "ea4c0fff326f43ebae5578fc872761b9": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_d152456d2df7450dbffaaf086e0829e0",
       "style": "IPY_MODEL_ca2bb6f4ceb04fd88cd99665a56d8be3",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">open_dataset</div>"
      }
     },
     "eb1259ce7c024b5fb7ec36574cd41abc": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "eb5594bce14747268973ce2ddea58c31": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "ed600db447d34ef5a29df2b1d2ba63be": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "ProgressStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "eda32370d8bf4ab7bf75dcc928501ae6": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "VBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_b95a37166a5648f38e750dbc99771e2a",
        "IPY_MODEL_301a95e102db48c3a3eb2715f08dd7ca",
        "IPY_MODEL_f6bae69fc2ad433ab1a295813613d909",
        "IPY_MODEL_aec0c035c08543b29794f66320a987f1",
        "IPY_MODEL_c5e7c458e6644ad6a740e8273a8a9b4b",
        "IPY_MODEL_b4b16138f8bb4c30b44f174001b0a16b",
        "IPY_MODEL_5884d6b6b42241fc8bd1a6a133c13175",
        "IPY_MODEL_7a9a16d2704e44fb885411fe7c6caa55",
        "IPY_MODEL_7156c1c7c8bc4f42be26e46c5fcfc7b6",
        "IPY_MODEL_7ac710d0024e41c28b38f61f92f78ca0",
        "IPY_MODEL_3e2c49bbfa864e42847c496878967ed7",
        "IPY_MODEL_ccad241d1d1f4c3fb20550c903c996ef"
       ],
       "layout": "IPY_MODEL_7895384ef609472e8c5b8d3a6aed0a32"
      }
     },
     "effe2377b1154d2e8225c4009cd95147": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "f1077042042f4f7aa768cf8de419abff": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_864f86efae5942e6a01f94b3166d58ab",
       "style": "IPY_MODEL_eb5594bce14747268973ce2ddea58c31",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">400 / 400</div>"
      }
     },
     "f108c394046c4dfc8222ea4e897be458": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "f3c68e6c65f748c88759e7c92a71105d": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "f5b17b7ec4ef467a9fcc84dfa30fcec6": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "f6bae69fc2ad433ab1a295813613d909": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_16a657f4d607437ab9b410f813f2d9e6",
        "IPY_MODEL_57170ae76a7740029a8d807ec4fd60b2",
        "IPY_MODEL_72159e57aed64c1894b2e06438c43a9b"
       ],
       "layout": "IPY_MODEL_95de8e3cf5404d31997c688996d89e83"
      }
     },
     "f722ae2ebadd448d855765117f31dc1c": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fa52e53279d04a748125c8d39f2c5835": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fa5d3f866ced4d089b61887f906cbb57": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fa8bdf78b87a480ea4c4cb16a6919dbb": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "DescriptionStyleModel",
      "state": {
       "description_width": ""
      }
     },
     "fab2041dbff044d1a3ce897899f95ddd": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fc28302262fd4c9a97f343606f8ee19e": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fc68d54698af4e28958a9bd336689f99": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "fc88700aa8fd4936b0f5b963bac8f2cd": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HBoxModel",
      "state": {
       "children": [
        "IPY_MODEL_06d6453dc50b4bea9da719218133f0c4",
        "IPY_MODEL_fcd6992da2614da18a26c949bc19d8bc",
        "IPY_MODEL_01dbfd072b954d5183c19aba8e62381e"
       ],
       "layout": "IPY_MODEL_fc68d54698af4e28958a9bd336689f99"
      }
     },
     "fcd6992da2614da18a26c949bc19d8bc": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "FloatProgressModel",
      "state": {
       "bar_style": "success",
       "layout": "IPY_MODEL_bd06655e865d4b21abbe462990213f82",
       "max": 1,
       "style": "IPY_MODEL_2d528af430144c1ba2f335e8c9cb3964",
       "value": 1
      }
     },
     "ff596372e4f74f5c8196bc6cbb76f975": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_dcd62cc1ae3d477080ac2e678dde3d89",
       "style": "IPY_MODEL_856bdb5a97834136899b3c580f39cd2d",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align:left; word-wrap: break-word;\">truediv</div>"
      }
     },
     "ffa5f598cb474238b8dab6027bd48336": {
      "model_module": "@jupyter-widgets/base",
      "model_module_version": "1.2.0",
      "model_name": "LayoutModel",
      "state": {}
     },
     "ffdb4d5f739544c7b38e487b75f4cea7": {
      "model_module": "@jupyter-widgets/controls",
      "model_module_version": "1.5.0",
      "model_name": "HTMLModel",
      "state": {
       "layout": "IPY_MODEL_aad2f568d10c4de9856e1c6599f61c46",
       "style": "IPY_MODEL_6d4044f4893e49909a4a4f946e7322f6",
       "value": "<div style=\"padding: 0px 10px 0px 10px; text-align: right\">2400 / 2400</div>"
      }
     }
    },
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
